Update auth API endpoints to remove "/v2" prefix
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
This commit is contained in:
@ -51,7 +51,7 @@ export class AuthV2Repo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const login = await this.request("/v2/auth/state", {
|
const login = await this.request("/auth/state", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
name,
|
name,
|
||||||
@ -69,7 +69,7 @@ export class AuthV2Repo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async resetPassword(name: string, password: string, token: string) {
|
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",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
name,
|
name,
|
||||||
@ -83,7 +83,7 @@ export class AuthV2Repo {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.request("/v2/auth/state", {
|
await this.request("/auth/state", {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ export class AuthV2Repo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await this.requestWithToken(this.refreshToken!, "/v2/auth/state", {
|
const response = await this.requestWithToken(this.refreshToken!, "/auth/state", {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
}).then(value => value.json()).then(value => AuthTokenSchema.parse(value));
|
}).then(value => value.json()).then(value => AuthTokenSchema.parse(value));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user