Skip to content

Commit

Permalink
Merge branch 'axum' of http://www.github.com/modrinth/labrinth into axum
Browse files Browse the repository at this point in the history
  • Loading branch information
thesuzerain committed Jan 16, 2024
2 parents 4a651b4 + b8f6f86 commit dd08a60
Show file tree
Hide file tree
Showing 23 changed files with 834 additions and 820 deletions.
2 changes: 1 addition & 1 deletion src/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl IntoResponse for AuthenticationError {
fn into_response(self) -> Response {
let error_message = ApiError {
error: self.error_name(),
description: &*self.to_string(),
description: &self.to_string(),
};

(self.status_code(), Json(error_message)).into_response()
Expand Down
7 changes: 2 additions & 5 deletions src/database/models/notification_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,8 @@ impl Notification {
.execute(&mut **transaction)
.await?;

Notification::clear_user_notifications_cache(
notifications.iter().map(|n| &n.user_id),
redis,
)
.await?;
let user_ids = notifications.iter().map(|n| n.user_id).collect::<Vec<_>>();
Notification::clear_user_notifications_cache(&user_ids, redis).await?;

Ok(())
}
Expand Down
Loading

0 comments on commit dd08a60

Please sign in to comment.