Made validateUserToken avaible via get requests & updated the system so

that it now has a privacy policy & terms of service (TOS) And added a
add email & display current email logic.
This commit is contained in:
yuanhau 2025-06-03 11:42:30 +08:00
parent 45397675f5
commit aa355e03fd
4 changed files with 103 additions and 16 deletions

View file

@ -1,12 +1,11 @@
import sql from "~/server/components/postgres";
export default defineEventHandler(async (event) => {
const body = await readBody(event);
const token = getCookie(event, "token");
if (!token) {
return {
error: "INVALID_TOKEN",
requested_action: "LOGOUT_USER",
requested_action: "USE_DEFAULT_STATE",
};
}
const checkIsUUIDRegex =