aboutsummaryrefslogtreecommitdiff
path: root/users.go
diff options
context:
space:
mode:
Diffstat (limited to 'users.go')
-rw-r--r--users.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/users.go b/users.go
index 740f94f..4c2f9a6 100644
--- a/users.go
+++ b/users.go
@@ -15,7 +15,9 @@ func add_user_ssh(ctx context.Context, pubkey string) (user_id int, err error) {
if tx, err = database.Begin(ctx); err != nil {
return
}
- defer tx.Rollback(ctx)
+ defer func() {
+ _ = tx.Rollback(ctx)
+ }()
if err = tx.QueryRow(ctx, `INSERT INTO users (type) VALUES ('pubkey_only') RETURNING id`).Scan(&user_id); err != nil {
return