Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
Arnaud Delcasse | de94bd583f | |
Arnaud Delcasse | 3a80acae37 | |
Arnaud Delcasse | 045bcb7bf6 | |
Nicolas CARON | 6f9d57c6d7 |
3
go.sum
3
go.sum
|
@ -790,6 +790,9 @@ github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2
|
||||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||||
|
github.com/oleiade/reflections v1.0.0/go.mod h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60=
|
||||||
|
github.com/oleiade/reflections v1.0.1 h1:D1XO3LVEYroYskEsoSiGItp9RUxG6jWnCVvrqH0HHQM=
|
||||||
|
github.com/oleiade/reflections v1.0.1/go.mod h1:rdFxbxq4QXVZWj0F+e9jqjDkc7dbp97vkRixKo2JR60=
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
|
|
|
@ -38,19 +38,25 @@ func (a Account) ToStorageType() storage.Account {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (lc LocalAuth) ToStorageType() storage.LocalAuth {
|
func (lc LocalAuth) ToStorageType() storage.LocalAuth {
|
||||||
|
emailValidation := storage.Validation{}
|
||||||
|
if lc.EmailValidation != nil {
|
||||||
|
emailValidation.Validated = lc.EmailValidation.Validated
|
||||||
|
emailValidation.ValidationCode = lc.EmailValidation.ValidationCode
|
||||||
|
}
|
||||||
|
|
||||||
|
phoneValidation := storage.Validation{}
|
||||||
|
if lc.PhoneNumberValidation != nil {
|
||||||
|
phoneValidation.Validated = lc.PhoneNumberValidation.Validated
|
||||||
|
phoneValidation.ValidationCode = lc.PhoneNumberValidation.ValidationCode
|
||||||
|
}
|
||||||
|
|
||||||
return storage.LocalAuth{
|
return storage.LocalAuth{
|
||||||
Username: lc.Username,
|
Username: lc.Username,
|
||||||
Password: lc.Password,
|
Password: lc.Password,
|
||||||
Email: lc.Email,
|
Email: lc.Email,
|
||||||
EmailValidation: storage.Validation{
|
EmailValidation: emailValidation,
|
||||||
Validated: lc.EmailValidation.Validated,
|
|
||||||
ValidationCode: lc.EmailValidation.ValidationCode,
|
|
||||||
},
|
|
||||||
PhoneNumber: lc.PhoneNumber,
|
PhoneNumber: lc.PhoneNumber,
|
||||||
PhoneNumberValidation: storage.Validation{
|
PhoneNumberValidation: phoneValidation,
|
||||||
Validated: lc.PhoneNumberValidation.Validated,
|
|
||||||
ValidationCode: lc.PhoneNumberValidation.ValidationCode,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue