0
0

inc/dec score

This commit is contained in:
syuilo 2019-04-14 20:28:57 +09:00
parent 182c09d952
commit 3c73a7ec6d
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 4 additions and 2 deletions

View File

@ -49,7 +49,8 @@ export default async (user: User, note: Note, reaction?: string) => {
})
.where('id = :id', { id: note.id })
.execute();
// v11 inc score
Notes.increment({ id: note.id }, 'score', 1);
perUserReactionsChart.update(user, note);

View File

@ -30,7 +30,8 @@ export default async (user: User, note: Note) => {
})
.where('id = :id', { id: note.id })
.execute();
// v11 dec score
Notes.decrement({ id: note.id }, 'score', 1);
publishNoteStream(note.id, 'unreacted', {
reaction: exist.reaction,