[backend/api] Increment instead of decrement on like
This commit is contained in:
parent
992189e824
commit
fdf1245070
1 changed files with 1 additions and 1 deletions
|
@ -50,7 +50,7 @@ public class NoteController(DatabaseContext db, NoteService noteSvc, NoteRendere
|
|||
|
||||
var success = await noteSvc.LikeNoteAsync(note, user);
|
||||
|
||||
return Ok(new ValueResponse(success ? --note.LikeCount : note.LikeCount));
|
||||
return Ok(new ValueResponse(success ? ++note.LikeCount : note.LikeCount));
|
||||
}
|
||||
|
||||
[HttpPost("{id}/unlike")]
|
||||
|
|
Loading…
Add table
Reference in a new issue