diff --git a/components/app/windows/settings.vue b/components/app/windows/settings.vue index d2470aa..8a9369c 100644 --- a/components/app/windows/settings.vue +++ b/components/app/windows/settings.vue @@ -2,12 +2,19 @@ import { BadgeCheckIcon, OctagonAlertIcon } from "lucide-vue-next"; import { Input } from "~/components/ui/input"; const { t, locale } = useI18n(); -const user = ref(); +const user = ref(""); +const enterFirstName = ref(); +const useremail = ref(); +const enteruseremail = ref(); onMounted(async () => { const req = await fetch("/api/user/validateUserToken"); const res = await req.json(); - user.value = res; + user.value = res.firstName; + useremail.value = res; }); +const setFirstName = async () => { + const staticFirstName = ""; +}; const logoutAction = () => {}; const groqApiKeyRegex = /^gsk_[a-zA-Z0-9]{52}$/; @@ -68,15 +75,77 @@ const confirmLogout = async () => { showLogoutDialog.value = false; }; const deleteAccount = async () => { - const req = await fetch("/api/user/delete", { + const req = await fetch("/api/user/action", { method: "DELETE", }); }; +/** + * + * userAccount: fetchViaSQL[0].username, + requested_action: "CONTINUE", + email: fetchViaSQL[0].email, + avatarURL: fetchViaSQL[0].avatarurl, + firstName: fetchViaSQL[0].firstName, + */