mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
use write permissions for delete queries
This commit is contained in:
parent
59b161f3a8
commit
301a6e48ff
@ -81,7 +81,7 @@ export default {
|
|||||||
muteUser: async (_parent, params, context, _resolveInfo) => {
|
muteUser: async (_parent, params, context, _resolveInfo) => {
|
||||||
const { user: currentUser } = context
|
const { user: currentUser } = context
|
||||||
if (currentUser.id === params.id) return null
|
if (currentUser.id === params.id) return null
|
||||||
await neode.cypher(
|
await neode.writeCypher(
|
||||||
`
|
`
|
||||||
MATCH(u:User {id: $currentUser.id})-[previousRelationship:FOLLOWS]->(b:User {id: $params.id})
|
MATCH(u:User {id: $currentUser.id})-[previousRelationship:FOLLOWS]->(b:User {id: $params.id})
|
||||||
DELETE previousRelationship
|
DELETE previousRelationship
|
||||||
@ -98,7 +98,7 @@ export default {
|
|||||||
unmuteUser: async (_parent, params, context, _resolveInfo) => {
|
unmuteUser: async (_parent, params, context, _resolveInfo) => {
|
||||||
const { user: currentUser } = context
|
const { user: currentUser } = context
|
||||||
if (currentUser.id === params.id) return null
|
if (currentUser.id === params.id) return null
|
||||||
await neode.cypher(
|
await neode.writeCypher(
|
||||||
`
|
`
|
||||||
MATCH(u:User {id: $currentUser.id})-[previousRelationship:MUTED]->(b:User {id: $params.id})
|
MATCH(u:User {id: $currentUser.id})-[previousRelationship:MUTED]->(b:User {id: $params.id})
|
||||||
DELETE previousRelationship
|
DELETE previousRelationship
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user