refactored api routes

This commit is contained in:
Daniel
2023-08-20 12:00:42 -04:00
parent b0e92c6253
commit 8dfd1598f3
12 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ type AccountStore = {
const useAccountStore = create<AccountStore>()((set) => ({
account: {} as AccountSettings,
setAccount: async (id) => {
const response = await fetch(`/api/routes/users?id=${id}`);
const response = await fetch(`/api/users?id=${id}`);
const data = await response.json();
@@ -24,7 +24,7 @@ const useAccountStore = create<AccountStore>()((set) => ({
if (response.ok) set({ account: { ...data.response, profilePic } });
},
updateAccount: async (user) => {
const response = await fetch("/api/routes/users", {
const response = await fetch("/api/users", {
method: "PUT",
body: JSON.stringify(user),
headers: {