Merge pull request 'show new notifications @ top' (#317) from staging into main

Reviewed-on: Ruderverein-Donau-Linz/rowt#317
This commit is contained in:
philipp 2024-03-28 08:11:37 +01:00
commit c5af1e4cf8

View File

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