more refactors :)

This commit is contained in:
2026-02-08 20:52:58 +11:00
parent 97342e08fe
commit 24733098b4
10 changed files with 28 additions and 50 deletions

View File

@@ -76,7 +76,7 @@ func HasRole(ctx context.Context, tx bun.Tx, userID int, roleName roles.Role) (b
Where("u.id = ?", userID).
Scan(ctx)
if err != nil {
if err == sql.ErrNoRows {
if errors.Is(err, sql.ErrNoRows) {
return false, nil
}
return false, errors.Wrap(err, "tx.NewSelect")