Google Reader API: Allow rename and move feed at the same time

Fixes #2191
This commit is contained in:
Frédéric Guillot 2023-12-01 17:24:24 -08:00
parent d0f99cee1a
commit 1af1bc3460
1 changed files with 6 additions and 5 deletions

View File

@ -872,18 +872,19 @@ func (h *handler) editSubscriptionHandler(w http.ResponseWriter, r *http.Request
}
case "edit":
if title != "" {
err := rename(streamIds[0], title, h.store, userID)
if err != nil {
if err := rename(streamIds[0], title, h.store, userID); err != nil {
json.ServerError(w, r, err)
return
}
} else {
}
if r.Form.Has(ParamTagsAdd) {
if newLabel.Type != LabelStream {
json.BadRequest(w, r, errors.New("destination must be a label"))
return
}
err := move(streamIds[0], newLabel, h.store, userID)
if err != nil {
if err := move(streamIds[0], newLabel, h.store, userID); err != nil {
json.ServerError(w, r, err)
return
}