Просмотр исходного кода

fix: trailing slash added to api routes

Timothy J. Baek 1 год назад
Родитель
Сommit
bdc131378f
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      src/lib/apis/auths/index.ts
  2. 1 1
      src/lib/apis/users/index.ts

+ 1 - 1
src/lib/apis/auths/index.ts

@@ -3,7 +3,7 @@ import { WEBUI_API_BASE_URL } from '$lib/constants';
 export const getSessionUser = async (token: string) => {
 	let error = null;
 
-	const res = await fetch(`${WEBUI_API_BASE_URL}/auths`, {
+	const res = await fetch(`${WEBUI_API_BASE_URL}/auths/`, {
 		method: 'GET',
 		headers: {
 			'Content-Type': 'application/json',

+ 1 - 1
src/lib/apis/users/index.ts

@@ -34,7 +34,7 @@ export const updateUserRole = async (token: string, id: string, role: string) =>
 export const getUsers = async (token: string) => {
 	let error = null;
 
-	const res = await fetch(`${WEBUI_API_BASE_URL}/users`, {
+	const res = await fetch(`${WEBUI_API_BASE_URL}/users/`, {
 		method: 'GET',
 		headers: {
 			'Content-Type': 'application/json',