Update some code & made a basic isThis ArticleStarred api? & starring is

now a wip!
This commit is contained in:
yuanhau 2025-06-14 23:46:23 +08:00
parent 026c4a31a3
commit 2cf787a401
4 changed files with 75 additions and 1 deletions

View file

@ -29,6 +29,14 @@ export default defineEventHandler(async (event) => {
sqlC: sqlC,
success: true,
};
} else if (requestChange === "email") {
const sqlC = await sql`
UPDATE users SET email = ${apiKeyqq[0]}
WHERE username = ${token.user}`;
return {
sqlC: sqlC,
success: true,
};
}
const sqlC = await sql.unsafe(
`UPDATE user_other_data SET ${requestChange} = $1 WHERE username = $2`,