mirror of
https://github.com/pocketbase/pocketbase.git
synced 2024-11-24 17:07:00 +02:00
added new lines for readability and consistency
This commit is contained in:
parent
a16b0c9004
commit
dbbfa243bc
@ -100,6 +100,7 @@ func (form *UserOauth2Login) Submit() (*models.User, *auth.AuthUser, error) {
|
||||
}
|
||||
return user, authData, nil
|
||||
}
|
||||
|
||||
if !config.AllowRegistrations {
|
||||
// registration of new users is not allowed via the Oauth2 provider
|
||||
return nil, authData, errors.New("Cannot find user with the authorized email.")
|
||||
|
@ -69,6 +69,7 @@ func NewRecordFromNullStringMap(collection *Collection, data dbx.NullStringMap)
|
||||
// each row in the provided NullStringMap slice.
|
||||
func NewRecordsFromNullStringMaps(collection *Collection, rows []dbx.NullStringMap) []*Record {
|
||||
result := make([]*Record, len(rows))
|
||||
|
||||
for i, row := range rows {
|
||||
result[i] = NewRecordFromNullStringMap(collection, row)
|
||||
}
|
||||
|
@ -153,11 +153,13 @@ func (f FilterData) resolveToken(token fexpr.Token, fieldResolver FieldResolver)
|
||||
}
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
return name, params, err
|
||||
case fexpr.TokenNumber, fexpr.TokenText:
|
||||
placeholder := "t" + security.RandomString(7)
|
||||
name := fmt.Sprintf("{:%s}", placeholder)
|
||||
params := dbx.Params{placeholder: token.Literal}
|
||||
|
||||
return name, params, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user