Move api to v1 folder

This commit is contained in:
2022-06-27 09:08:26 -05:00
parent 6fe79a1892
commit 2fa58305cb
15 changed files with 43 additions and 35 deletions

View File

@@ -6,7 +6,7 @@ export async function fetchUser(cookie = "") {
}
const res = await fetch(
"/api/me",
"/api/v1/me",
cookie
? {
headers: {
@@ -53,7 +53,7 @@ export function useFetchUser({ required } = {}) {
if (isMounted) {
// When the user is not logged in but login is required
if (required && !user) {
window.location.href = "/api/login";
window.location.href = "/api/v1/login";
return;
}
setUser(user);