mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
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
21 lines
550 B
Go
21 lines
550 B
Go
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package ui // import "miniflux.app/v2/internal/ui"
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"miniflux.app/v2/internal/http/request"
|
|
"miniflux.app/v2/internal/http/response/json"
|
|
)
|
|
|
|
func (h *handler) toggleStarred(w http.ResponseWriter, r *http.Request) {
|
|
entryID := request.RouteInt64Param(r, "entryID")
|
|
if err := h.store.ToggleStarred(request.UserID(r), entryID); err != nil {
|
|
json.ServerError(w, r, err)
|
|
return
|
|
}
|
|
|
|
json.OK(w, r, "OK")
|
|
}
|