diff --git a/backend/src/schema/resolvers/posts.js b/backend/src/schema/resolvers/posts.js index cf0cad7d3..069fb3058 100644 --- a/backend/src/schema/resolvers/posts.js +++ b/backend/src/schema/resolvers/posts.js @@ -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 `, diff --git a/backend/src/schema/resolvers/posts.spec.js b/backend/src/schema/resolvers/posts.spec.js index ab6a73fd6..da4a49dba 100644 --- a/backend/src/schema/resolvers/posts.spec.js +++ b/backend/src/schema/resolvers/posts.spec.js @@ -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`, ) }) diff --git a/webapp/components/ContentMenu.vue b/webapp/components/ContentMenu.vue index 88dab2b07..521a8ed6e 100644 --- a/webapp/components/ContentMenu.vue +++ b/webapp/components/ContentMenu.vue @@ -200,7 +200,6 @@ export default { }, }) }, - pinPost() {}, }, }