mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
Made a working settings panel & includes the user's info, what is
Some checks are pending
Build and Push Docker Image / build-and-push (push) Waiting to run
Some checks are pending
Build and Push Docker Image / build-and-push (push) Waiting to run
missing? well, all the actions that requires the data to be sent to the server is still not there yet. Tried to add onboarding, but I have just no idea how to do it (Maybe I can do it w/ a video?
This commit is contained in:
parent
1eb15058d7
commit
29760dda96
6 changed files with 201 additions and 63 deletions
24
server/api/user/sendUserChanges.post.ts
Normal file
24
server/api/user/sendUserChanges.post.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import sql from "~/server/components/postgres";
|
||||
export default defineEventHandler(async (event) => {
|
||||
const body = await readBody(event);
|
||||
/*
|
||||
const userToken = getCookie(event, "token");
|
||||
if (!userToken) {
|
||||
return {
|
||||
error: "ERR_NOT_ALLOWED",
|
||||
};
|
||||
}
|
||||
const checkUserToken = await sql`
|
||||
select * from usertokens
|
||||
where token=${userToken}
|
||||
`;
|
||||
if (checkUserToken.length === 0) {
|
||||
return {
|
||||
error: "ERR_NOT_ALLOWED",
|
||||
};
|
||||
}
|
||||
if (request_change === "groq_api_key") {
|
||||
const updateListing = await sql``;
|
||||
}*/
|
||||
return { body: body };
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue