diff --git a/backend/src/middleware/notifications/notificationsMiddleware.js b/backend/src/middleware/notifications/notificationsMiddleware.js index 61db59e01..b7c4b7750 100644 --- a/backend/src/middleware/notifications/notificationsMiddleware.js +++ b/backend/src/middleware/notifications/notificationsMiddleware.js @@ -174,7 +174,16 @@ const notifyReportFiler = async (reportId, resourceId, context) => { ON MATCH SET notification.updatedAt = toString(datetime()) SET notification.read = FALSE WITH notification, submitter, - {__typename: "FiledReport", reportId: report.id, createdAt: filed.createdAt, reasonCategory: filed.reasonCategory, reasonDescription: filed.reasonDescription, resource: apoc.map.merge(properties(resource), {__typename: labels(resource)[0]})} AS finalResource + { + __typename: "FiledReport", + reportId: report.id, + createdAt: filed.createdAt, + reasonCategory: filed.reasonCategory, + reasonDescription: filed.reasonDescription, + resource: apoc.map.merge(properties(resource), { + __typename: labels(resource)[0] + }) + } AS finalResource RETURN notification {.*, from: finalResource, to: properties(submitter)} `, { diff --git a/backend/src/schema/types/type/NOTIFIED.gql b/backend/src/schema/types/type/NOTIFIED.gql index 162e733ae..9d6b536df 100644 --- a/backend/src/schema/types/type/NOTIFIED.gql +++ b/backend/src/schema/types/type/NOTIFIED.gql @@ -8,7 +8,6 @@ type NOTIFIED { to: User! } -# Wolle union NotificationSource = Post | Comment | Report union NotificationSource = Post | Comment | FiledReport enum NotificationOrdering { diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index dcea9fff5..635152def 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -395,7 +395,6 @@ When("open the notification menu and click on the first item", () => { }); }); - Then("see {int} unread notifications in the top menu", count => { cy.get(".notifications-menu").should("contain", count); });