Merge pull request 'cleaner logs' (#407) from cleaner-logs into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 12m47s
CI/CD Pipeline / deploy-staging (push) Successful in 5m31s
CI/CD Pipeline / deploy-main (push) Has been skipped

Reviewed-on: #407
This commit is contained in:
philipp 2024-04-19 10:40:35 +02:00
commit 6416356d89

View File

@ -591,7 +591,7 @@ ORDER BY departure DESC
} }
pub async fn delete(&self, db: &SqlitePool, user: &User) -> Result<(), LogbookDeleteError> { pub async fn delete(&self, db: &SqlitePool, user: &User) -> Result<(), LogbookDeleteError> {
Log::create(db, format!("{user:?} deleted trip: {self:?}")).await; Log::create(db, format!("{} deleted trip: {self:?}", user.name)).await;
if user.has_role(db, "admin").await if user.has_role(db, "admin").await
|| user.has_role(db, "Vorstand").await || user.has_role(db, "Vorstand").await