mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 00:16:16 -06:00
more
This commit is contained in:
parent
0f7cfa75f3
commit
526a14a92d
486 changed files with 84353 additions and 23865 deletions
|
|
@ -181,7 +181,7 @@ func (m *Module) parseUserFromClaims(ctx context.Context, claims *oidc.Claims, i
|
|||
// note that for the first iteration, iString is still "" when the check is made, so our first choice
|
||||
// is still the raw username with no integer stuck on the end
|
||||
for i := 1; !found; i = i + 1 {
|
||||
if err := m.db.IsUsernameAvailable(ctx, username + iString); err != nil {
|
||||
if err := m.db.IsUsernameAvailable(ctx, username+iString); err != nil {
|
||||
if strings.Contains(err.Error(), "db error") {
|
||||
// if there's an actual db error we should return
|
||||
return nil, fmt.Errorf("error checking username availability: %s", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue