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:
parent
8d65c2d571
commit
0b85657536
8 changed files with 715 additions and 681 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue