updated response messages and rebuilt ui/dist

This commit is contained in:
Gani Georgiev committed 2022-09-02 10:00:36 +03:00
1 parent 06a7f1af05
commit df1a947b61
17 files changed
+690 -688

No files matched your search

+3 -1
View File
@@ -84,6 +84,8 @@ func (dao *Dao) DeleteExternalAuth(model *models.ExternalAuth) error {
return err
}
// if the user doesn't have an email, make sure that there
// is at least one other external auth relation available
if user.Email == "" {
allExternalAuths, err := dao.FindAllExternalAuthsByUserId(user.Id)
if err != nil {
@@ -91,7 +93,7 @@ func (dao *Dao) DeleteExternalAuth(model *models.ExternalAuth) error {
}
if len(allExternalAuths) <= 1 {
return errors.New("You cannot delete the only available external auth relation because the user doesn't have an email set.")
return errors.New("You cannot delete the only available external auth relation because the user doesn't have an email address.")
}
}