create branch mika

This commit is contained in:
mfrigo 2023-09-06 13:37:31 +02:00
parent bde22b9ce9
commit 56dad2ee7d
1 changed files with 5 additions and 1 deletions

View File

@ -129,7 +129,7 @@ func (psql PostgresqlStorage) LocalAuthentication(namespace string, username *st
req += fmt.Sprintf(` AND phone_number = '%s'`, *phone_number) req += fmt.Sprintf(` AND phone_number = '%s'`, *phone_number)
} }
req += ";" req += ";"
fmt.Println(req)
account.Authentication.Local = &LocalAuth{} account.Authentication.Local = &LocalAuth{}
err := psql.DbConnection.QueryRow(req).Scan( err := psql.DbConnection.QueryRow(req).Scan(
&account.ID, &account.ID,
@ -145,18 +145,22 @@ func (psql PostgresqlStorage) LocalAuthentication(namespace string, username *st
} }
err = json.Unmarshal(metadata, &account.Metadata) err = json.Unmarshal(metadata, &account.Metadata)
if err != nil { if err != nil {
fmt.Println("one")
return nil, err return nil, err
} }
err = json.Unmarshal(data, &account.Data) err = json.Unmarshal(data, &account.Data)
if err != nil { if err != nil {
fmt.Println("two")
return nil, err return nil, err
} }
err = json.Unmarshal(emailValidation, &account.Authentication.Local.EmailValidation) err = json.Unmarshal(emailValidation, &account.Authentication.Local.EmailValidation)
if err != nil { if err != nil {
fmt.Println("three")
return nil, err return nil, err
} }
err = json.Unmarshal(phoneValidation, &account.Authentication.Local.PhoneNumberValidation) err = json.Unmarshal(phoneValidation, &account.Authentication.Local.PhoneNumberValidation)
if err != nil { if err != nil {
fmt.Println("four")
return nil, err return nil, err
} }
return account, nil return account, nil