mirror of
https://github.com/hpware/news-analyze.git
synced 2025-07-18 08:29:06 +00:00
Made a simple custom groq api thingy (just the settings page)
This commit is contained in:
parent
5392974261
commit
8eb19d7242
8 changed files with 86 additions and 41 deletions
|
@ -2,11 +2,11 @@ import sql from "~/server/components/postgres";
|
|||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const body = await readBody(event);
|
||||
const token = body.token;
|
||||
const token = getCookie(event, "token");
|
||||
if (!token) {
|
||||
return {
|
||||
error: "NO_TOKEN_GIVEN",
|
||||
requested_action: "SHOW_WARNING",
|
||||
error: "INVALID_TOKEN",
|
||||
requested_action: "LOGOUT_USER",
|
||||
};
|
||||
}
|
||||
const checkIsUUIDRegex =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue