mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 23:32:47 +01:00
Improve restore
This commit is contained in:
3
auth.go
3
auth.go
@@ -30,7 +30,8 @@ func (c *catalystResolver) UserCreateIfNotExists(ctx context.Context, user *maut
|
||||
}
|
||||
|
||||
if user == nil || user.APIKey {
|
||||
_, err = c.database.UserCreateSetupAPIKey(ctx, password)
|
||||
// ignore error, because we don't care if the user already exists
|
||||
_, _ = c.database.UserCreateSetupAPIKey(ctx, password)
|
||||
} else {
|
||||
_, err = c.database.UserCreate(ctx, &model.UserForm{
|
||||
Apikey: user.APIKey,
|
||||
|
||||
Reference in New Issue
Block a user