summaryrefslogtreecommitdiffstats
path: root/api/license.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-01-27 12:49:22 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-01-27 12:49:22 -0500
commite467241a10e75c583c4d9ee0a4c6205a1175fab1 (patch)
tree3be4e33decd0c898931b9a212b42fbe6834589f4 /api/license.go
parente50e26a2db6d7a4f42478b60f533a57dd33cc686 (diff)
parentc50b8661ec0c1925062d3d5584ed5899c9e7ff44 (diff)
downloadchat-e467241a10e75c583c4d9ee0a4c6205a1175fab1.tar.gz
chat-e467241a10e75c583c4d9ee0a4c6205a1175fab1.tar.bz2
chat-e467241a10e75c583c4d9ee0a4c6205a1175fab1.zip
Merge pull request #1997 from mattermost/PLT-7-server-final
PLT-7 Removing AppError ctor
Diffstat (limited to 'api/license.go')
-rw-r--r--api/license.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/api/license.go b/api/license.go
index 5c602a68e..4077c0e46 100644
--- a/api/license.go
+++ b/api/license.go
@@ -5,7 +5,6 @@ package api
import (
"bytes"
- "fmt"
l4g "github.com/alecthomas/log4go"
"github.com/gorilla/mux"
"github.com/mattermost/platform/model"
@@ -65,13 +64,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.NewLocAppError("addLicense", "api.license.add_license.unique_users.app_error", map[string]interface{}{"Users": *license.Features.Users, "Count": uniqueUserCount}, "")
return
}
}