diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-27 11:05:46 -0500 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-27 11:05:46 -0500 |
commit | c50b8661ec0c1925062d3d5584ed5899c9e7ff44 (patch) | |
tree | b8f5fb1aa1768618357bf66d039c3e4f64a2d3e2 | |
parent | dc4b71bba2cad5e85e86cc6ecb743bea84f9ccc8 (diff) | |
download | chat-c50b8661ec0c1925062d3d5584ed5899c9e7ff44.tar.gz chat-c50b8661ec0c1925062d3d5584ed5899c9e7ff44.tar.bz2 chat-c50b8661ec0c1925062d3d5584ed5899c9e7ff44.zip |
Fixing build
-rw-r--r-- | api/license.go | 5 | ||||
-rw-r--r-- | model/utils_test.go | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/api/license.go b/api/license.go index 5c97637e7..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.NewLocAppError("addLicense", api.license.add_license.invalid_count.app_error, nil, 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", api.license.add_license.unique_users.app_error, map[string]interface{}{"Users": *license.Features.Users, "Count": uniqueUserCount}) + c.Err = model.NewLocAppError("addLicense", "api.license.add_license.unique_users.app_error", map[string]interface{}{"Users": *license.Features.Users, "Count": uniqueUserCount}, "") return } } diff --git a/model/utils_test.go b/model/utils_test.go index b8eabe264..02a08d113 100644 --- a/model/utils_test.go +++ b/model/utils_test.go @@ -27,7 +27,7 @@ func TestRandomString(t *testing.T) { } func TestAppError(t *testing.T) { - err := NewAppError("TestAppError", "message", "") + err := NewLocAppError("TestAppError", "message", nil, "") json := err.ToJson() rerr := AppErrorFromJson(strings.NewReader(json)) if err.Message != rerr.Message { |