Fixed misuse of api
This commit is contained in:
@@ -85,7 +85,7 @@ export function AuthProvider({ children }: PropsWithChildren) {
|
||||
};
|
||||
|
||||
const logout = async () => {
|
||||
const data = await get("logout");
|
||||
const [_, data] = await get("logout");
|
||||
if (data === null) {
|
||||
setUser(null);
|
||||
notify(
|
||||
@@ -101,7 +101,7 @@ export function AuthProvider({ children }: PropsWithChildren) {
|
||||
};
|
||||
|
||||
const update = async () => {
|
||||
let data = await get("me");
|
||||
let [_, data] = await get("me");
|
||||
|
||||
if (data !== undefined) {
|
||||
setUser(data);
|
||||
|
||||
Reference in New Issue
Block a user