Create home page
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { APIClient } from "./ApiClient";
|
||||
|
||||
export interface AuthInfo {
|
||||
name: string;
|
||||
id: string;
|
||||
}
|
||||
|
||||
const TokenStateKey = "auth-state";
|
||||
@ -60,11 +60,15 @@ export class AuthApi {
|
||||
* Sign out
|
||||
*/
|
||||
static async SignOut(): Promise<void> {
|
||||
await APIClient.exec({
|
||||
uri: "/auth/sign_out",
|
||||
method: "GET",
|
||||
});
|
||||
|
||||
this.UnsetAuthenticated();
|
||||
|
||||
try {
|
||||
await APIClient.exec({
|
||||
uri: "/auth/sign_out",
|
||||
method: "GET",
|
||||
});
|
||||
} finally {
|
||||
window.location.href = "/";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user