mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-23 22:40:24 +02:00
updated response messages and rebuilt ui/dist
This commit is contained in:
1 parent
06a7f1af05
commit
df1a947b61
17 files changed
+690
-688
No files matched your search
@@ -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.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user