Add admin dashboard, event reporting, moderation report screens, moderation log
Close #156 and #158 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { ApolloCache } from 'apollo-cache';
|
||||
import { NormalizedCacheObject } from 'apollo-cache-inmemory';
|
||||
import { ICurrentUserRole } from '@/types/current-user.model';
|
||||
|
||||
export function buildCurrentUserResolver(cache: ApolloCache<NormalizedCacheObject>) {
|
||||
cache.writeData({
|
||||
@@ -9,18 +10,20 @@ export function buildCurrentUserResolver(cache: ApolloCache<NormalizedCacheObjec
|
||||
id: null,
|
||||
email: null,
|
||||
isLoggedIn: false,
|
||||
role: ICurrentUserRole.USER,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
Mutation: {
|
||||
updateCurrentUser: (_, { id, email, isLoggedIn }, { cache }) => {
|
||||
updateCurrentUser: (_, { id, email, isLoggedIn, role }, { cache }) => {
|
||||
const data = {
|
||||
currentUser: {
|
||||
id,
|
||||
email,
|
||||
isLoggedIn,
|
||||
role,
|
||||
__typename: 'CurrentUser',
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user