store feed list state
This commit is contained in:
parent
327d2ac6b7
commit
98ba266921
4 changed files with 11 additions and 6 deletions
|
|
@ -81,6 +81,7 @@ func FolderListHandler(rw http.ResponseWriter, req *http.Request) {
|
|||
|
||||
type UpdateFolder struct {
|
||||
Title *string `json:"title,omitempty"`
|
||||
IsExpanded *bool `json:"is_expanded,omitempty"`
|
||||
}
|
||||
|
||||
func FolderHandler(rw http.ResponseWriter, req *http.Request) {
|
||||
|
|
@ -99,6 +100,9 @@ func FolderHandler(rw http.ResponseWriter, req *http.Request) {
|
|||
if body.Title != nil {
|
||||
db(req).RenameFolder(id, *body.Title)
|
||||
}
|
||||
if body.IsExpanded != nil {
|
||||
db(req).ToggleFolderExpanded(id, *body.IsExpanded)
|
||||
}
|
||||
rw.WriteHeader(http.StatusOK)
|
||||
} else if req.Method == "DELETE" {
|
||||
db(req).DeleteFolder(id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue