Move /api/account to /api/auth/account
An account refers to the user the active session is logged in as. As such it doesn't make sense outside of the /auth API paths that deals with the current authenticated user. Move /api/account to /api/auth/account to reflect this.
This commit is contained in:
parent
e7dc00db54
commit
04b9707272
6 changed files with 5 additions and 5 deletions
|
@ -41,7 +41,7 @@ const timezone = ref(accountStore.timezone ?? "");
|
||||||
|
|
||||||
async function changeSettings() {
|
async function changeSettings() {
|
||||||
try {
|
try {
|
||||||
await $fetch("/api/account", {
|
await $fetch("/api/auth/account", {
|
||||||
method: "patch",
|
method: "patch",
|
||||||
body: {
|
body: {
|
||||||
timezone: timezone.value,
|
timezone: timezone.value,
|
||||||
|
@ -55,7 +55,7 @@ async function changeSettings() {
|
||||||
|
|
||||||
async function deleteAccount() {
|
async function deleteAccount() {
|
||||||
try {
|
try {
|
||||||
await $fetch.raw("/api/account", {
|
await $fetch.raw("/api/auth/account", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
});
|
});
|
||||||
await sessionStore.fetch();
|
await sessionStore.fetch();
|
||||||
|
|
|
@ -56,7 +56,7 @@ async function logIn() {
|
||||||
const createName = ref("");
|
const createName = ref("");
|
||||||
async function createAccount() {
|
async function createAccount() {
|
||||||
try {
|
try {
|
||||||
const res = await $fetch.raw("/api/account", {
|
const res = await $fetch.raw("/api/auth/account", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
@ -74,7 +74,7 @@ async function createAccount() {
|
||||||
}
|
}
|
||||||
async function createAnonymousAccount() {
|
async function createAnonymousAccount() {
|
||||||
try {
|
try {
|
||||||
const res = await $fetch.raw("/api/account", {
|
const res = await $fetch.raw("/api/auth/account", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
|
|
@ -45,7 +45,7 @@ export const useAccountStore = defineStore("account", () => {
|
||||||
newIds = newIds.filter(newId => !filterIds.has(newId));
|
newIds = newIds.filter(newId => !filterIds.has(newId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await $fetch("/api/account", {
|
await $fetch("/api/auth/account", {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
body: { interestedIds: newIds },
|
body: { interestedIds: newIds },
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue