Many changes to try to improve reliability
This commit is contained in:
@@ -44,12 +44,16 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
'/userinfo/' + id,
|
||||
ExecutionMethod.GET
|
||||
)
|
||||
.then(
|
||||
(res) => (userNames.value[id] = JSON.parse(res.responseBody).name)
|
||||
);
|
||||
.then((res) => {
|
||||
if (res.responseBody) {
|
||||
userNames.value[id] = JSON.parse(res.responseBody).name;
|
||||
} else {
|
||||
console.error(res, id);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Failed to get username. Error: ' + e);
|
||||
console.error('Failed to get username. Error: ' + e);
|
||||
}
|
||||
return userNames.value[id];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user