diff --git a/pages/account/settings.vue b/pages/account/settings.vue index 1a560e2..04691d5 100644 --- a/pages/account/settings.vue +++ b/pages/account/settings.vue @@ -41,7 +41,7 @@ const timezone = ref(accountStore.timezone ?? ""); async function changeSettings() { try { - await $fetch("/api/account", { + await $fetch("/api/auth/account", { method: "patch", body: { timezone: timezone.value, @@ -55,7 +55,7 @@ async function changeSettings() { async function deleteAccount() { try { - await $fetch.raw("/api/account", { + await $fetch.raw("/api/auth/account", { method: "DELETE", }); await sessionStore.fetch(); diff --git a/pages/login.vue b/pages/login.vue index 651d12c..8f5e3be 100644 --- a/pages/login.vue +++ b/pages/login.vue @@ -56,7 +56,7 @@ async function logIn() { const createName = ref(""); async function createAccount() { try { - const res = await $fetch.raw("/api/account", { + const res = await $fetch.raw("/api/auth/account", { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded", @@ -74,7 +74,7 @@ async function createAccount() { } async function createAnonymousAccount() { try { - const res = await $fetch.raw("/api/account", { + const res = await $fetch.raw("/api/auth/account", { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded", diff --git a/server/api/account.delete.ts b/server/api/auth/account.delete.ts similarity index 100% rename from server/api/account.delete.ts rename to server/api/auth/account.delete.ts diff --git a/server/api/account.patch.ts b/server/api/auth/account.patch.ts similarity index 100% rename from server/api/account.patch.ts rename to server/api/auth/account.patch.ts diff --git a/server/api/account.post.ts b/server/api/auth/account.post.ts similarity index 100% rename from server/api/account.post.ts rename to server/api/auth/account.post.ts diff --git a/stores/account.ts b/stores/account.ts index a6f7147..4f47742 100644 --- a/stores/account.ts +++ b/stores/account.ts @@ -45,7 +45,7 @@ export const useAccountStore = defineStore("account", () => { newIds = newIds.filter(newId => !filterIds.has(newId)); } } - await $fetch("/api/account", { + await $fetch("/api/auth/account", { method: "PATCH", body: { interestedIds: newIds }, })