Fixes user login that broke in previous commit

This commit is contained in:
Mattias Granlund 2023-11-16 11:04:27 +01:00
parent e243b4d9ff
commit a8c2fb6884

View File

@ -15,9 +15,8 @@
const pollForUser = async (token: string) => { const pollForUser = async (token: string) => {
const apiUser = await cloud.login.user.get(token).catch(() => null); const apiUser = await cloud.login.user.get(token).catch(() => null);
if (apiUser) { if (apiUser) {
user = apiUser; userService.set(apiUser);
userService.logout; return;
return apiUser;
} }
return new Promise((resolve) => { return new Promise((resolve) => {
setTimeout(async () => { setTimeout(async () => {