1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-26 18:21:01 +00:00

refactor: Replace "Bookmarks" with "Starred"

Replaces usage of the word "bookmark" with "star"/"starred" in order to be more
consistent with the UI and database models, and to reduce confusion with
"bookmarklet" and integration features.

This is in preparation of future work on read-it-later features.
Which are also not called "bookmarks" to prevent any further confusion.
https://github.com/orgs/miniflux/discussions/3719

Related-to: https://github.com/miniflux/v2/pull/2219
This commit is contained in:
Steven vanZyl 2025-08-20 16:00:11 -04:00 committed by Frédéric Guillot
parent 4d656d2739
commit 60cd7ffe88
37 changed files with 171 additions and 170 deletions

View file

@ -67,7 +67,8 @@ func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool) {
sr.HandleFunc("/entries", handler.setEntryStatus).Methods(http.MethodPut)
sr.HandleFunc("/entries/{entryID}", handler.getEntry).Methods(http.MethodGet)
sr.HandleFunc("/entries/{entryID}", handler.updateEntry).Methods(http.MethodPut)
sr.HandleFunc("/entries/{entryID}/bookmark", handler.toggleBookmark).Methods(http.MethodPut)
sr.HandleFunc("/entries/{entryID}/bookmark", handler.toggleStarred).Methods(http.MethodPut)
sr.HandleFunc("/entries/{entryID}/star", handler.toggleStarred).Methods(http.MethodPut)
sr.HandleFunc("/entries/{entryID}/save", handler.saveEntry).Methods(http.MethodPost)
sr.HandleFunc("/entries/{entryID}/fetch-content", handler.fetchContent).Methods(http.MethodGet)
sr.HandleFunc("/flush-history", handler.flushHistory).Methods(http.MethodPut, http.MethodDelete)

View file

@ -2749,7 +2749,7 @@ func TestUpdateEntryEndpoint(t *testing.T) {
}
}
func TestToggleBookmarkEndpoint(t *testing.T) {
func TestToggleStarredEndpoint(t *testing.T) {
testConfig := newIntegrationTestConfig()
if !testConfig.isConfigured() {
t.Skip(skipIntegrationTestsMessage)
@ -2777,7 +2777,7 @@ func TestToggleBookmarkEndpoint(t *testing.T) {
t.Fatalf(`Failed to get entries: %v`, err)
}
if err := regularUserClient.ToggleBookmark(result.Entries[0].ID); err != nil {
if err := regularUserClient.ToggleStarred(result.Entries[0].ID); err != nil {
t.Fatal(err)
}
@ -2787,7 +2787,7 @@ func TestToggleBookmarkEndpoint(t *testing.T) {
}
if !entry.Starred {
t.Fatalf(`The entry should be bookmarked`)
t.Fatalf(`The entry should be starred`)
}
}

View file

@ -186,9 +186,9 @@ func (h *handler) setEntryStatus(w http.ResponseWriter, r *http.Request) {
json.NoContent(w, r)
}
func (h *handler) toggleBookmark(w http.ResponseWriter, r *http.Request) {
func (h *handler) toggleStarred(w http.ResponseWriter, r *http.Request) {
entryID := request.RouteInt64Param(r, "entryID")
if err := h.store.ToggleBookmark(request.UserID(r), entryID); err != nil {
if err := h.store.ToggleStarred(request.UserID(r), entryID); err != nil {
json.ServerError(w, r, err)
return
}