Commit e8655db
committed
feat: Add response handling and error checking to POST /messages/:id/like
- Check if messageWithIdAsNumber exists after incrementing likes
- Notify all waiting clients via callBacksForNewMessages callbacks
- Send updated message with 200 status on success
- Return 404 error if message not found
- Enable real-time like updates via long polling
- Improve error handling for invalid message IDs1 parent ee7c2c1 commit e8655db
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
81 | 92 | | |
82 | 93 | | |
83 | 94 | | |
| |||
0 commit comments