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
|
@ -10,13 +10,13 @@ import (
|
|||
// CategoryForm represents a feed form in the UI
|
||||
type CategoryForm struct {
|
||||
Title string
|
||||
HideGlobally string
|
||||
HideGlobally bool
|
||||
}
|
||||
|
||||
// NewCategoryForm returns a new CategoryForm.
|
||||
func NewCategoryForm(r *http.Request) *CategoryForm {
|
||||
return &CategoryForm{
|
||||
Title: r.FormValue("title"),
|
||||
HideGlobally: r.FormValue("hide_globally"),
|
||||
HideGlobally: r.FormValue("hide_globally") == "1",
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue