This commit is contained in:
Wolfgang Huß 2020-04-09 10:36:36 +02:00
parent 7478b788a6
commit ce245d65fa
3 changed files with 10 additions and 3 deletions

View File

@ -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)}
`,
{

View File

@ -8,7 +8,6 @@ type NOTIFIED {
to: User!
}
# Wolle union NotificationSource = Post | Comment | Report
union NotificationSource = Post | Comment | FiledReport
enum NotificationOrdering {

View File

@ -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);
});