inc/dec score
This commit is contained in:
parent
182c09d952
commit
3c73a7ec6d
@ -49,7 +49,8 @@ export default async (user: User, note: Note, reaction?: string) => {
|
|||||||
})
|
})
|
||||||
.where('id = :id', { id: note.id })
|
.where('id = :id', { id: note.id })
|
||||||
.execute();
|
.execute();
|
||||||
// v11 inc score
|
|
||||||
|
Notes.increment({ id: note.id }, 'score', 1);
|
||||||
|
|
||||||
perUserReactionsChart.update(user, note);
|
perUserReactionsChart.update(user, note);
|
||||||
|
|
||||||
|
@ -30,7 +30,8 @@ export default async (user: User, note: Note) => {
|
|||||||
})
|
})
|
||||||
.where('id = :id', { id: note.id })
|
.where('id = :id', { id: note.id })
|
||||||
.execute();
|
.execute();
|
||||||
// v11 dec score
|
|
||||||
|
Notes.decrement({ id: note.id }, 'score', 1);
|
||||||
|
|
||||||
publishNoteStream(note.id, 'unreacted', {
|
publishNoteStream(note.id, 'unreacted', {
|
||||||
reaction: exist.reaction,
|
reaction: exist.reaction,
|
||||||
|
Loading…
Reference in New Issue
Block a user