refac: frontend

This commit is contained in:
Timothy Jaeryang Baek
2024-11-15 02:05:43 -08:00
parent 2ab5b2fd71
commit d9dc04f1a1
20 changed files with 1340 additions and 1407 deletions

View File

@@ -4,7 +4,7 @@ import { getUserPosition } from '$lib/utils';
export const getUserPermissions = async (token: string) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/users/permissions/user`, {
const res = await fetch(`${WEBUI_API_BASE_URL}/users/permissions`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
@@ -31,7 +31,7 @@ export const getUserPermissions = async (token: string) => {
export const updateUserPermissions = async (token: string, permissions: object) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/users/permissions/user`, {
const res = await fetch(`${WEBUI_API_BASE_URL}/users/permissions`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',