1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

feat(api): add new endpoints to manage API keys

This commit is contained in:
Frédéric Guillot 2025-05-25 15:37:37 -07:00
parent ebd65da3b6
commit bfd8860398
13 changed files with 316 additions and 66 deletions

View file

@ -11,10 +11,9 @@ import (
"miniflux.app/v2/internal/http/route"
)
func (h *handler) removeAPIKey(w http.ResponseWriter, r *http.Request) {
func (h *handler) deleteAPIKey(w http.ResponseWriter, r *http.Request) {
keyID := request.RouteInt64Param(r, "keyID")
err := h.store.RemoveAPIKey(request.UserID(r), keyID)
if err != nil {
if err := h.store.DeleteAPIKey(request.UserID(r), keyID); err != nil {
html.ServerError(w, r, err)
return
}