From 14337843693f518d0d2717c43391fd0fc7f0a068 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Thu, 20 Feb 2025 22:15:02 +0100 Subject: [PATCH] Update auth API endpoints to remove "/v2" prefix --- src/components/repo/authv2.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/repo/authv2.ts b/src/components/repo/authv2.ts index a50d059..48564f5 100644 --- a/src/components/repo/authv2.ts +++ b/src/components/repo/authv2.ts @@ -51,7 +51,7 @@ export class AuthV2Repo { } try { - const login = await this.request("/v2/auth/state", { + const login = await this.request("/auth/state", { method: "POST", body: JSON.stringify({ name, @@ -69,7 +69,7 @@ export class AuthV2Repo { } async resetPassword(name: string, password: string, token: string) { - return await this.requestWithToken(token, "/v2/auth/register", { + return await this.requestWithToken(token, "/auth/register", { method: "POST", body: JSON.stringify({ name, @@ -83,7 +83,7 @@ export class AuthV2Repo { return; } - await this.request("/v2/auth/state", { + await this.request("/auth/state", { method: "DELETE", }); @@ -142,7 +142,7 @@ export class AuthV2Repo { } try { - const response = await this.requestWithToken(this.refreshToken!, "/v2/auth/state", { + const response = await this.requestWithToken(this.refreshToken!, "/auth/state", { method: "PUT", }).then(value => value.json()).then(value => AuthTokenSchema.parse(value));