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