1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 23:59:47 +02:00

Semver based in-app news and update notification

Ignore semver.patch for Whats New notifications.

Use semver.major.minor.patch for Admin notifications.

Changed endpoint to /news.
This commit is contained in:
McMatts 2018-03-23 11:52:19 +00:00
parent 8d65c2d571
commit 0b85657536
8 changed files with 715 additions and 681 deletions

View file

@ -347,11 +347,8 @@ func (h *Handler) GetViewable(w http.ResponseWriter, r *http.Request) {
ctx := domain.GetRequestContext(r)
sp, err := h.Store.Space.GetViewable(ctx)
if err != nil {
// response.WriteServerError(w, method, err)
h.Runtime.Log.Error(method, err)
return
}
response.WriteJSON(w, sp)
@ -369,15 +366,8 @@ func (h *Handler) GetAll(w http.ResponseWriter, r *http.Request) {
}
sp, err := h.Store.Space.GetAll(ctx)
if err != nil && err != sql.ErrNoRows {
response.WriteServerError(w, method, err)
if err != nil {
h.Runtime.Log.Error(method, err)
return
}
if len(sp) == 0 {
sp = []space.Space{}
}
response.WriteJSON(w, sp)