Skip to content
Snippets Groups Projects
Commit 1970987b authored by Anatole ROMON's avatar Anatole ROMON
Browse files

bug fix

parent 3ed18879
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ const typeDefs = `
type AdminMutation {
test: Boolean
createSubgroup(
uid: ID = null,
name: String,
......@@ -233,12 +235,27 @@ const resolvers = {
Mutation: {
asAdmin: (obj, args, context) => {
return hasAdminRights(context.user, args.groupid).then(res => {
if(res)
return {hasAdminRights : true};
else
return {hasAdminRights : false};
});
},
createGroup: (obj, args, context) => {
return createGroupIfLegal(context.user, args);
}
},
AdminMutation: {
test: (obj, args, context) => {
console.log(obj);
console.log(typeof obj);
return null;
}
}
};
const schema = makeExecutableSchema({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment