Merge pull request 'cleaner logs' (#408) from cleaner-logs into main
Some checks failed
CI/CD Pipeline / test (push) Failing after 10m28s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped

Reviewed-on: #408
This commit is contained in:
philipp 2024-04-19 10:40:40 +02:00
commit 8aa4f3577a

View File

@ -591,7 +591,7 @@ ORDER BY departure DESC
}
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
|| user.has_role(db, "Vorstand").await