fix: notifications查询type列别名与sqlx rename冲突导致500
This commit is contained in:
@@ -45,7 +45,7 @@ pub async fn list_notifications(
|
||||
|
||||
let rows = sqlx::query_as::<_, crate::models::Notification>(
|
||||
r#"
|
||||
SELECT id, scope, user_id, type AS type_, title, content, priority, link,
|
||||
SELECT id, scope, user_id, type, title, content, priority, link,
|
||||
is_read, created_at, expires_at
|
||||
FROM notifications
|
||||
WHERE scope = 'all' OR (scope = 'user' AND user_id = $1)
|
||||
|
||||
Reference in New Issue
Block a user