1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-30 18:49:43 +02:00

Make API work with new schema

This commit is contained in:
Harvey Kandola 2018-09-19 16:03:29 +01:00
parent 28342fcf5e
commit 4f0cc2f616
48 changed files with 1218 additions and 1097 deletions

View file

@ -190,7 +190,7 @@ func (h *Handler) ValidateToken(w http.ResponseWriter, r *http.Request) {
rc.OrgName = org.Title
rc.Administrator = false
rc.Editor = false
rc.Global = false
rc.GlobalAdmin = false
rc.AppURL = r.Host
rc.Subdomain = organization.GetSubdomainFromHost(r)
rc.SSL = r.TLS != nil
@ -210,7 +210,7 @@ func (h *Handler) ValidateToken(w http.ResponseWriter, r *http.Request) {
rc.Administrator = u.Admin
rc.Editor = u.Editor
rc.Global = u.Global
rc.GlobalAdmin = u.GlobalAdmin
response.WriteJSON(w, u)
}