fix and refactor code

This commit is contained in:
2026-04-27 15:45:06 +03:00
parent 316d06b1d2
commit 05076eb367
17 changed files with 89 additions and 91 deletions

View File

@@ -10,7 +10,7 @@ export const useUserStore = defineStore('user', () => {
async function fetchProfile() {
try {
const res = await fetch('/api/admin/profile')
const res = await fetch('/api/profile')
if (res.ok) {
const data = await res.json()
id.value = data.id
@@ -27,7 +27,7 @@ export const useUserStore = defineStore('user', () => {
}
async function updateProfile(updates: { email?: string; password?: string; language?: string }) {
const res = await fetch('/api/admin/profile', {
const res = await fetch('/api/profile', {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(updates)