From e85b5fb98835fb952eb2ed55f81e79eb3ef361ec Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 1 Sep 2017 16:42:02 +0100 Subject: App: NewLocAppError -> NewAppError (#7327) * App: NewLocAppError -> NewAppError * Remove statuscode that got missed. --- app/email_batching.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/email_batching.go') diff --git a/app/email_batching.go b/app/email_batching.go index e2a2286ce..2e643d2b1 100644 --- a/app/email_batching.go +++ b/app/email_batching.go @@ -14,6 +14,7 @@ import ( l4g "github.com/alecthomas/log4go" "github.com/nicksnyder/go-i18n/i18n" + "net/http" ) const ( @@ -36,12 +37,12 @@ func InitEmailBatching() { func AddNotificationEmailToBatch(user *model.User, post *model.Post, team *model.Team) *model.AppError { if !*utils.Cfg.EmailSettings.EnableEmailBatching { - return model.NewLocAppError("AddNotificationEmailToBatch", "api.email_batching.add_notification_email_to_batch.disabled.app_error", nil, "") + return model.NewAppError("AddNotificationEmailToBatch", "api.email_batching.add_notification_email_to_batch.disabled.app_error", nil, "", http.StatusNotImplemented) } if !emailBatchingJob.Add(user, post, team) { l4g.Error(utils.T("api.email_batching.add_notification_email_to_batch.channel_full.app_error")) - return model.NewLocAppError("AddNotificationEmailToBatch", "api.email_batching.add_notification_email_to_batch.channel_full.app_error", nil, "") + return model.NewAppError("AddNotificationEmailToBatch", "api.email_batching.add_notification_email_to_batch.channel_full.app_error", nil, "", http.StatusInternalServerError) } return nil -- cgit v1.2.3-1-g7c22