mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
fix(api): hide_globally
categories field should be a boolean
This commit is contained in:
parent
764212f37c
commit
d33e305af9
16 changed files with 262 additions and 70 deletions
|
@ -46,9 +46,9 @@ func (h *handler) updateCategory(w http.ResponseWriter, r *http.Request) {
|
|||
view.Set("countUnread", h.store.CountUnreadEntries(loggedUser.ID))
|
||||
view.Set("countErrorFeeds", h.store.CountUserFeedsWithErrors(loggedUser.ID))
|
||||
|
||||
categoryRequest := &model.CategoryRequest{
|
||||
Title: categoryForm.Title,
|
||||
HideGlobally: categoryForm.HideGlobally,
|
||||
categoryRequest := &model.CategoryModificationRequest{
|
||||
Title: model.SetOptionalField(categoryForm.Title),
|
||||
HideGlobally: model.SetOptionalField(categoryForm.HideGlobally),
|
||||
}
|
||||
|
||||
if validationErr := validator.ValidateCategoryModification(h.store, loggedUser.ID, category.ID, categoryRequest); validationErr != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue