From dc4b71bba2cad5e85e86cc6ecb743bea84f9ccc8 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 27 Jan 2016 10:56:15 -0500 Subject: PLT-7 Removing AppError ctor --- api/license.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/license.go') diff --git a/api/license.go b/api/license.go index 5c602a68e..5c97637e7 100644 --- a/api/license.go +++ b/api/license.go @@ -65,13 +65,13 @@ func addLicense(c *Context, w http.ResponseWriter, r *http.Request) { license = model.LicenseFromJson(strings.NewReader(licenseStr)) if result := <-Srv.Store.User().AnalyticsUniqueUserCount(""); result.Err != nil { - c.Err = model.NewAppError("addLicense", "Unable to count total unique users.", fmt.Sprintf("err=%v", result.Err.Error())) + c.Err = model.NewLocAppError("addLicense", api.license.add_license.invalid_count.app_error, nil, result.Err.Error()) return } else { uniqueUserCount := result.Data.(int64) if uniqueUserCount > int64(*license.Features.Users) { - c.Err = model.NewAppError("addLicense", fmt.Sprintf("This license only supports %d users, when your system has %d unique users. Unique users are counted distinctly by email address. You can see total user count under Site Reports -> View Statistics.", *license.Features.Users, uniqueUserCount), "") + c.Err = model.NewAppError("addLicense", api.license.add_license.unique_users.app_error, map[string]interface{}{"Users": *license.Features.Users, "Count": uniqueUserCount}) return } } -- cgit v1.2.3-1-g7c22