init
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { api } from './api';
|
||||
import { api } from "./api";
|
||||
|
||||
export type User = {
|
||||
id: string;
|
||||
@@ -23,7 +23,7 @@ class AuthStore {
|
||||
|
||||
async refresh() {
|
||||
try {
|
||||
const me = await api.get<Me>('/auth/me');
|
||||
const me = await api.get<Me>("/auth/me");
|
||||
this.user = me.user;
|
||||
this.settings = me.settings;
|
||||
} catch {
|
||||
@@ -42,7 +42,7 @@ class AuthStore {
|
||||
|
||||
async logout() {
|
||||
try {
|
||||
await api.post('/auth/logout');
|
||||
await api.post("/auth/logout");
|
||||
} finally {
|
||||
this.user = null;
|
||||
this.settings = null;
|
||||
|
||||
Reference in New Issue
Block a user