mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
IT WORKS NOW :))))))) (The send groq api key part)
This commit is contained in:
parent
e2b4acb68b
commit
2ef4cd9277
2 changed files with 9 additions and 4 deletions
|
@ -32,9 +32,13 @@ export default defineEventHandler(async (event) => {
|
|||
if (!allowedColumns.includes(requestChange)) {
|
||||
throw new Error("Invalid column name provided");
|
||||
}
|
||||
const sqlC = await sql.unsafe`
|
||||
UPDATE user_other_data SET ${requestChange} = ${apiKeyqq[0]}
|
||||
WHERE username = ${checkUserToken[0].username}`;
|
||||
|
||||
const sqlC = await sql.unsafe(
|
||||
`
|
||||
UPDATE user_other_data SET ${requestChange} = $1
|
||||
WHERE username = $2`,
|
||||
[apiKeyqq[0], checkUserToken[0].username],
|
||||
);
|
||||
|
||||
/**
|
||||
* // Example of how requestChange might be validated
|
||||
|
@ -52,6 +56,7 @@ export default defineEventHandler(async (event) => {
|
|||
body: body,
|
||||
allowed: allowed,
|
||||
data: body.value.match(clearBadDataRegex),
|
||||
sqlC: sqlC,
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue