Remove definition of mutation enable

This commit is contained in:
Wolfgang Huß 2019-11-06 14:38:09 +01:00
parent d4e7e10f8c
commit 7d217148d3
3 changed files with 0 additions and 19 deletions

View File

@ -160,7 +160,6 @@ const permissions = shield(
shout: isAuthenticated,
unshout: isAuthenticated,
changePassword: isAuthenticated,
enable: isModerator,
disable: isModerator,
decide: isModerator,
CreateComment: isAuthenticated,

View File

@ -29,23 +29,6 @@ export default {
if (!resource) return null
return resource.id
},
enable: async (object, params, { user, driver }) => {
const { id: resourceId } = params
const cypher = `
MATCH (resource {id: $resourceId})<-[decision:DECIDED]-(:User)
SET resource.disabled = false
SET decision.disable = false, decision.updatedAt = toString(datetime())
RETURN resource {.id}
`
const session = driver.session()
const res = await session.run(cypher, { resourceId })
session.close()
const [resource] = res.records.map(record => {
return record.get('resource')
})
if (!resource) return null
return resource.id
},
decide: async (_object, params, context, _resolveInfo) => {
let createdRelationshipWithNestedAttributes = null
// Wolle console.log('params: ', params)

View File

@ -25,7 +25,6 @@ type Mutation {
requestPasswordReset(email: String!): Boolean!
resetPassword(email: String!, nonce: String!, newPassword: String!): Boolean!
disable(id: ID!): ID
enable(id: ID!): ID
# Shout the given Type and ID
shout(id: ID!, type: ShoutTypeEnum): Boolean!
# Unshout the given Type and ID