mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-25 04:24:43 -04: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,7 +13,6 @@ import { authProviderTypeOneClick } from '../../../api/config/types'
|
||||||
* Fetches metadata about the currently signed-in user from the API and stores it into the redux.
|
* Fetches metadata about the currently signed-in user from the API and stores it into the redux.
|
||||||
*/
|
*/
|
||||||
export const fetchAndSetUser: () => Promise<void> = async () => {
|
export const fetchAndSetUser: () => Promise<void> = async () => {
|
||||||
try {
|
|
||||||
const me = await getMe()
|
const me = await getMe()
|
||||||
setUser({
|
setUser({
|
||||||
username: me.username,
|
username: me.username,
|
||||||
|
@ -22,9 +21,6 @@ export const fetchAndSetUser: () => Promise<void> = async () => {
|
||||||
authProvider: me.authProvider,
|
authProvider: me.authProvider,
|
||||||
email: me.email
|
email: me.email
|
||||||
})
|
})
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue