From acd30d1105369347ee8c837c586b8c5f0b6cfcad Mon Sep 17 00:00:00 2001 From: jan Date: Sun, 9 Oct 2016 14:36:15 +0200 Subject: beim API aufruf eine Kopie erstellen diff --git a/modules/lists/lists.go b/modules/lists/lists.go index 67856fe..ee0eb68 100644 --- a/modules/lists/lists.go +++ b/modules/lists/lists.go @@ -499,13 +499,21 @@ func (m *Module) APIgetUserLists(w http.ResponseWriter, r *http.Request, p httpr } lists := m.GetUserLists(user, false) + var pubLists []List for _, list := range lists { // owner wegen SICHERHEIT rausfiltern (nodumppassword2k16) - list.Owner = nil + // list.Owner = nil + var tempList List + tempList.Description = list.Description + tempList.ForkOf = list.ForkOf + tempList.ID = list.ID + tempList.Name = list.Name + tempList.UpdatedAt = list.UpdatedAt + pubLists = append(pubLists, tempList) } - data, err := json.Marshal(&lists) + data, err := json.Marshal(&pubLists) if err != nil { log.Println(err) http.Error(w, "500", http.StatusInternalServerError) -- cgit v0.10.1