Still working through messages and notifications.
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user