mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
Correct space public/protected/private detection logic
This commit is contained in:
parent
ae6494b4f0
commit
f8e47fe1d2
2 changed files with 10 additions and 10 deletions
|
@ -334,14 +334,11 @@ func (h *Handler) GetViewable(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
sp, err := h.Store.Space.GetViewable(ctx)
|
||||
|
||||
if err != nil && err != sql.ErrNoRows {
|
||||
response.WriteServerError(w, method, err)
|
||||
if err != nil {
|
||||
// response.WriteServerError(w, method, err)
|
||||
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