summaryrefslogtreecommitdiffstats
path: root/api/license.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-04-15 08:48:14 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-04-15 08:48:14 -0400
commitc6c3f1e47829bba9b332da3d4c61193532e87032 (patch)
treeadbbbf666eb0f25ae98be9e7df8642975bdb46c5 /api/license.go
parent9243b8761a8062a864a882dbab2aa4edc2780d73 (diff)
downloadchat-c6c3f1e47829bba9b332da3d4c61193532e87032.tar.gz
chat-c6c3f1e47829bba9b332da3d4c61193532e87032.tar.bz2
chat-c6c3f1e47829bba9b332da3d4c61193532e87032.zip
Update client license etag to handle new features (#2716)
Diffstat (limited to 'api/license.go')
-rw-r--r--api/license.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/api/license.go b/api/license.go
index ed0771d17..526f4a4c1 100644
--- a/api/license.go
+++ b/api/license.go
@@ -153,20 +153,13 @@ func removeLicense(c *Context, w http.ResponseWriter, r *http.Request) {
}
func getClientLicenceConfig(c *Context, w http.ResponseWriter, r *http.Request) {
- config := utils.ClientLicense
-
- var etag string
- if config["IsLicensed"] == "false" {
- etag = model.Etag(config["IsLicensed"])
- } else {
- etag = model.Etag(config["IsLicensed"], config["IssuedAt"])
- }
-
+ etag := utils.GetClientLicenseEtag()
if HandleEtag(etag, w, r) {
return
}
- w.Header().Set(model.HEADER_ETAG_SERVER, etag)
+ clientLicense := utils.ClientLicense
- w.Write([]byte(model.MapToJson(config)))
+ w.Header().Set(model.HEADER_ETAG_SERVER, etag)
+ w.Write([]byte(model.MapToJson(clientLicense)))
}