aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api/v1/user/email.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/api/v1/user/email.go')
-rw-r--r--internal/route/api/v1/user/email.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/route/api/v1/user/email.go b/internal/route/api/v1/user/email.go
index 07fd4f8a..5584803e 100644
--- a/internal/route/api/v1/user/email.go
+++ b/internal/route/api/v1/user/email.go
@@ -46,7 +46,7 @@ func AddEmail(c *context.APIContext, form api.CreateEmailOption) {
if err := db.AddEmailAddresses(emails); err != nil {
if db.IsErrEmailAlreadyUsed(err) {
- c.ErrorStatus(http.StatusUnprocessableEntity, errors.New("email address has been used: "+err.(db.ErrEmailAlreadyUsed).Email))
+ c.ErrorStatus(http.StatusUnprocessableEntity, errors.New("email address has been used: "+err.(db.ErrEmailAlreadyUsed).Email()))
} else {
c.Error(err, "add email addresses")
}