mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-20 20:01:25 +00:00
Disable shouting of own content
This commit is contained in:
parent
c27204d56e
commit
45a004662f
@ -13,8 +13,8 @@ type Mutation {
|
||||
|
||||
"Shout the given Type and ID"
|
||||
shout(id: ID!, type: ShoutTypeEnum): String! @cypher(statement: """
|
||||
MATCH (n {id: $id}), (u:User {id: $cypherParams.currentUserId})
|
||||
WHERE $type IN labels(n)
|
||||
MATCH (n {id: $id})<-[:WROTE]-(wu:User), (u:User {id: $cypherParams.currentUserId})
|
||||
WHERE $type IN labels(n) AND NOT wu.id = $cypherParams.currentUserId
|
||||
MERGE (u)-[r:SHOUTED]->(n)
|
||||
RETURN COUNT(r) > 0
|
||||
""")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user