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.Println(req)
account.Authentication.Local = &LocalAuth{}
err := psql.DbConnection.QueryRow(req).Scan(
&account.ID,
@ -145,18 +145,22 @@ func (psql PostgresqlStorage) LocalAuthentication(namespace string, username *st
}
err = json.Unmarshal(metadata, &account.Metadata)
if err != nil {
fmt.Println("one")
return nil, err
}
err = json.Unmarshal(data, &account.Data)
if err != nil {
fmt.Println("two")
return nil, err
}
err = json.Unmarshal(emailValidation, &account.Authentication.Local.EmailValidation)
if err != nil {
fmt.Println("three")
return nil, err
}
err = json.Unmarshal(phoneValidation, &account.Authentication.Local.PhoneNumberValidation)
if err != nil {
fmt.Println("four")
return nil, err
}
return account, nil