fix: notifications查询type列别名与sqlx rename冲突导致500

This commit is contained in:
2026-05-26 15:08:57 +08:00
parent 640f57b6da
commit 8d7e9d8ca1

View File

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