Skip to content
Snippets Groups Projects
Verified Commit 85173d0a authored by Adrian Paschkowski's avatar Adrian Paschkowski :thinking:
Browse files

Fix some subscriptions

parent b72b106d
No related branches found
No related tags found
No related merge requests found
...@@ -249,7 +249,7 @@ export class AdminResolver { ...@@ -249,7 +249,7 @@ export class AdminResolver {
}); });
} }
@Mutation(() => TokenCodeModel) @Mutation(() => EntryModel)
@UseGuards(AuthGuard, AdminGuard) @UseGuards(AuthGuard, AdminGuard)
deleteEntry(@Args('id') id: string): Promise<EntryModel> { deleteEntry(@Args('id') id: string): Promise<EntryModel> {
return this.prisma.entry return this.prisma.entry
...@@ -258,7 +258,10 @@ export class AdminResolver { ...@@ -258,7 +258,10 @@ export class AdminResolver {
}) })
.then(async (entry) => { .then(async (entry) => {
await this.pubSub.publish('onEntryUpdate', { await this.pubSub.publish('onEntryUpdate', {
onEntryUpdate: entry, onEntryUpdate: {
id: entry.id,
deleted: true,
},
}); });
return this.entryService.unlockedEntry(entry); return this.entryService.unlockedEntry(entry);
......
...@@ -91,6 +91,9 @@ export class EntryResolver { ...@@ -91,6 +91,9 @@ export class EntryResolver {
by: group, by: group,
}, },
}); });
await this.pubSub.publish('onGroupUpdate', {
onGroupUpdate: group,
});
return this.entryService.unlockedEntry(entry); return this.entryService.unlockedEntry(entry);
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment