diff options
Diffstat (limited to 'src/graphql')
| -rw-r--r-- | src/graphql/user/resolvers.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/graphql/user/resolvers.ts b/src/graphql/user/resolvers.ts index 422d9170..2e1160bc 100644 --- a/src/graphql/user/resolvers.ts +++ b/src/graphql/user/resolvers.ts @@ -33,7 +33,7 @@ const auth = async (context: Context) => { const authenticatedBadgesOperation = async ( context: Context, - operation: (identity: UserIdentity, authorised: boolean) => void + operation: (identity: UserIdentity, authorised: boolean) => Promise<any> ) => { const identity = await auth(context); @@ -41,7 +41,7 @@ const authenticatedBadgesOperation = async ( const authorised = authorisedJson.includes(identity.id); - operation(identity, authorised); + await operation(identity, authorised); return { id: identity.id, @@ -63,7 +63,7 @@ const authenticatedPreferencesOperation = async ( return { id: identity.id, badges: [] as Badge[], - preferences: operation(identity, authorised) as Promise<UserPreferences> + preferences: await operation(identity, authorised) } }; |