fix: wrong model
This commit is contained in:
parent
6c34b383d7
commit
9cc05b3096
|
@ -21,7 +21,7 @@ func NewAccountService(portal interfaces.Portal) interfaces.AccountService {
|
||||||
func (s AccountServiceImpl) EmailExists(email string) (bool, models.User) {
|
func (s AccountServiceImpl) EmailExists(email string) (bool, models.User) {
|
||||||
var user models.User
|
var user models.User
|
||||||
|
|
||||||
result := s.portal.Database().Model(&models.Upload{}).Where(&models.User{Email: email}).First(&user)
|
result := s.portal.Database().Model(&models.User{}).Where(&models.User{Email: email}).First(&user)
|
||||||
|
|
||||||
return result.RowsAffected > 0, user
|
return result.RowsAffected > 0, user
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue