mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-03-23 09:52:34 +00:00
fix: don't suppress error when fetching user information
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
6e103a856e
commit
5e06e4ab3c
1 changed files with 8 additions and 12 deletions
|
@ -13,18 +13,14 @@ import { authProviderTypeOneClick } from '../../../api/config/types'
|
|||
* Fetches metadata about the currently signed-in user from the API and stores it into the redux.
|
||||
*/
|
||||
export const fetchAndSetUser: () => Promise<void> = async () => {
|
||||
try {
|
||||
const me = await getMe()
|
||||
setUser({
|
||||
username: me.username,
|
||||
displayName: me.displayName,
|
||||
photo: me.photo,
|
||||
authProvider: me.authProvider,
|
||||
email: me.email
|
||||
})
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
const me = await getMe()
|
||||
setUser({
|
||||
username: me.username,
|
||||
displayName: me.displayName,
|
||||
photo: me.photo,
|
||||
authProvider: me.authProvider,
|
||||
email: me.email
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue