23 lines
552 B
Go
23 lines
552 B
Go
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package ui // import "miniflux.app/ui"
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"miniflux.app/http/request"
|
|
"miniflux.app/http/response/html"
|
|
"miniflux.app/http/response/xml"
|
|
"miniflux.app/reader/opml"
|
|
)
|
|
|
|
func (h *handler) exportFeeds(w http.ResponseWriter, r *http.Request) {
|
|
opml, err := opml.NewHandler(h.store).Export(request.UserID(r))
|
|
if err != nil {
|
|
html.ServerError(w, r, err)
|
|
return
|
|
}
|
|
|
|
xml.Attachment(w, r, "feeds.opml", opml)
|
|
}
|