1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

fix(api): hide_globally categories field should be a boolean

This commit is contained in:
Frédéric Guillot 2025-04-21 18:45:30 -07:00
parent 764212f37c
commit d33e305af9
16 changed files with 262 additions and 70 deletions

View file

@ -20,8 +20,7 @@ func (h *handler) showEditCategoryPage(w http.ResponseWriter, r *http.Request) {
return
}
categoryID := request.RouteInt64Param(r, "categoryID")
category, err := h.store.Category(request.UserID(r), categoryID)
category, err := h.store.Category(request.UserID(r), request.RouteInt64Param(r, "categoryID"))
if err != nil {
html.ServerError(w, r, err)
return
@ -34,10 +33,7 @@ func (h *handler) showEditCategoryPage(w http.ResponseWriter, r *http.Request) {
categoryForm := form.CategoryForm{
Title: category.Title,
HideGlobally: "",
}
if category.HideGlobally {
categoryForm.HideGlobally = "checked"
HideGlobally: category.HideGlobally,
}
sess := session.New(h.store, request.SessionID(r))