Compare commits

..

2 Commits

Author SHA1 Message Date
c5af1e4cf8 Merge pull request 'show new notifications @ top' (#317) from staging into main
Some checks failed
CI/CD Pipeline / test (push) Successful in 9m59s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been cancelled
Reviewed-on: #317
2024-03-28 08:11:37 +01:00
ab565f1369 show new notifications @ top
Some checks failed
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
CI/CD Pipeline / test (push) Successful in 10m0s
CI/CD Pipeline / deploy-staging (push) Has been cancelled
2024-03-28 08:10:26 +01:00

View File

@ -58,7 +58,7 @@ impl Notification {
pub async fn for_user(db: &SqlitePool, user: &User) -> Vec<Self> { pub async fn for_user(db: &SqlitePool, user: &User) -> Vec<Self> {
sqlx::query_as!( sqlx::query_as!(
Self, Self,
"SELECT * FROM notification WHERE user_id = ?", "SELECT * FROM notification WHERE user_id = ? ORDER BY created_at DESC",
user.id user.id
) )
.fetch_all(db) .fetch_all(db)