Still working through messages and notifications.

This commit is contained in:
2025-10-30 17:22:52 +00:00
parent 8650b1fd63
commit 262536135d
18 changed files with 154 additions and 128 deletions

View File

@@ -42,7 +42,7 @@ func (s *Service) List(userID int64) ([]domain.Notification, error) {
const q = `
SELECT id, title, body, is_read, created_at
FROM notifications
WHERE user_id = ?
WHERE userId = ?
ORDER BY created_at DESC`
rows, err := s.DB.QueryContext(ctx, q, userID)
@@ -69,7 +69,7 @@ func (s *Service) GetByID(userID, id int64) (*domain.Notification, error) {
const q = `
SELECT id, title, body, is_read, created_at
FROM notifications
WHERE user_id = ? AND id = ?`
WHERE userId = ? AND id = ?`
var n domain.Notification
err := s.DB.QueryRowContext(ctx, q, userID, id).