Skip to content

Commit

Permalink
Google Reader API: Allow rename and move feed at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed Dec 2, 2023
1 parent d0f99ce commit 1af1bc3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/googlereader/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 1af1bc3

Please sign in to comment.