Skip to content
Snippets Groups Projects
Commit 8bcf9292 authored by Daniel Gerdes's avatar Daniel Gerdes
Browse files

Call 'updateToken' when unlocking entry

parent a84592f2
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ export class EntryResolver {
if (count > 0) throw new BadRequestException('Already unlocked');
await this.prismaService.group.update({
const group = await this.prismaService.group.update({
where: { id: req.group.id },
data: {
tokens: req.group.tokens - 1,
......@@ -76,6 +76,10 @@ export class EntryResolver {
},
});
pubSub.publish('updateToken', {
updateToken: group
})
return {
...unlock,
locked: false,
......
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