[backend/api] Increment instead of decrement on like

This commit is contained in:
Laura Hausmann 2024-03-07 05:39:38 +01:00
parent 992189e824
commit fdf1245070
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -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")]