mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
fix: clarify share flow in UI
Prior to this commit, to share an entry, a user has to click on the share link and then copy the URL they are redirected to. The danger is that they may right-click and copy the share link without actually clicking on it, and therefore share a link that, when authenticated, shares the entry, rather than actually sharing the entry. Here, we avoid this misinterpretation by making sharing into a POST request and using a form rather than a link.
This commit is contained in:
parent
6b70a7dc81
commit
2959a4d2bf
2 changed files with 7 additions and 6 deletions
|
@ -108,7 +108,7 @@ func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool) {
|
|||
uiRouter.HandleFunc("/entry/bookmark/{entryID}", handler.toggleBookmark).Name("toggleBookmark").Methods(http.MethodPost)
|
||||
|
||||
// Share pages.
|
||||
uiRouter.HandleFunc("/entry/share/{entryID}", handler.createSharedEntry).Name("shareEntry").Methods(http.MethodGet)
|
||||
uiRouter.HandleFunc("/entry/share/{entryID}", handler.createSharedEntry).Name("shareEntry").Methods(http.MethodPost)
|
||||
uiRouter.HandleFunc("/entry/unshare/{entryID}", handler.unshareEntry).Name("unshareEntry").Methods(http.MethodPost)
|
||||
uiRouter.HandleFunc("/share/{shareCode}", handler.sharedEntry).Name("sharedEntry").Methods(http.MethodGet)
|
||||
uiRouter.HandleFunc("/shares", handler.sharedEntries).Name("sharedEntries").Methods(http.MethodGet)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue