mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Follow @Tirokk's PR review suggestions
- add type :User to match - remove unneeded outdated pinPost
This commit is contained in:
parent
9f70012556
commit
8872dc16cf
@ -233,11 +233,10 @@ export default {
|
||||
let writeTxResultPromise = session.writeTransaction(async transaction => {
|
||||
const deletePreviousRelationsResponse = await transaction.run(
|
||||
`
|
||||
MATCH ()-[previousRelations:PINNED]->(post:Post)
|
||||
MATCH (:User)-[previousRelations:PINNED]->(post:Post)
|
||||
DELETE previousRelations
|
||||
RETURN post
|
||||
`,
|
||||
{ params },
|
||||
)
|
||||
return deletePreviousRelationsResponse.records.map(record => record.get('post').properties)
|
||||
})
|
||||
@ -276,7 +275,7 @@ export default {
|
||||
const writeTxResultPromise = session.writeTransaction(async transaction => {
|
||||
const unpinPostTransactionResponse = await transaction.run(
|
||||
`
|
||||
MATCH ()-[previousRelations:PINNED]->(post:Post {id: $params.id})
|
||||
MATCH (:User)-[previousRelations:PINNED]->(post:Post {id: $params.id})
|
||||
DELETE previousRelations
|
||||
RETURN post
|
||||
`,
|
||||
|
||||
@ -759,7 +759,7 @@ describe('UpdatePost', () => {
|
||||
variables = { ...variables, id: 'only-pinned-post' }
|
||||
await mutate({ mutation: pinPostMutation, variables })
|
||||
pinnedPost = await neode.cypher(
|
||||
`MATCH ()-[pinned:PINNED]->(post:Post) RETURN post, pinned`,
|
||||
`MATCH (:User)-[pinned:PINNED]->(post:Post) RETURN post, pinned`,
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
@ -200,7 +200,6 @@ export default {
|
||||
},
|
||||
})
|
||||
},
|
||||
pinPost() {},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user