mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Add per-application API Keys
This commit is contained in:
parent
d1afe13a1c
commit
25cc0d2447
35 changed files with 940 additions and 71 deletions
24
ui/api_key_remove.go
Normal file
24
ui/api_key_remove.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Copyright 2020 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package ui // import "miniflux.app/ui"
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/http/request"
|
||||
"miniflux.app/http/response/html"
|
||||
"miniflux.app/http/route"
|
||||
"miniflux.app/logger"
|
||||
)
|
||||
|
||||
func (h *handler) removeAPIKey(w http.ResponseWriter, r *http.Request) {
|
||||
keyID := request.RouteInt64Param(r, "keyID")
|
||||
err := h.store.RemoveAPIKey(request.UserID(r), keyID)
|
||||
if err != nil {
|
||||
logger.Error("[UI:RemoveAPIKey] %v", err)
|
||||
}
|
||||
|
||||
html.Redirect(w, r, route.Path(h.router, "apiKeys"))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue