feat(treasurechest): #64 fix tests
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 4m58s

This commit is contained in:
2025-05-13 12:37:11 +02:00
parent 74a44f043c
commit 6a04c7ae89
5 changed files with 78 additions and 62 deletions

View File

@@ -163,6 +163,13 @@ func (db AuthSqlite) DeleteUser(userId uuid.UUID) error {
return types.ErrInternal
}
_, err = tx.Exec("DELETE FROM treasure_chest WHERE user_id = ?", userId)
if err != nil {
_ = tx.Rollback()
log.Error("Could not delete user: %v", err)
return types.ErrInternal
}
err = tx.Commit()
if err != nil {
log.Error("Could not commit transaction: %v", err)