mirror of
https://github.com/documize/community.git
synced 2025-08-01 19:45:24 +02:00
Set category permissions for both users and groups
This commit is contained in:
parent
d1fdb385e9
commit
22679920d0
17 changed files with 335 additions and 124 deletions
|
@ -155,15 +155,11 @@ func (h *Handler) GetAll(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
cat, err := h.Store.Category.GetAllBySpace(ctx, spaceID)
|
||||
if err != nil && err != sql.ErrNoRows {
|
||||
if err != nil {
|
||||
response.WriteServerError(w, method, err)
|
||||
return
|
||||
}
|
||||
|
||||
if len(cat) == 0 {
|
||||
cat = []category.Category{}
|
||||
}
|
||||
|
||||
response.WriteJSON(w, cat)
|
||||
}
|
||||
|
||||
|
@ -320,10 +316,6 @@ func (h *Handler) GetSummary(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
if len(s) == 0 {
|
||||
s = []category.SummaryModel{}
|
||||
}
|
||||
|
||||
response.WriteJSON(w, s)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue