1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Avoid warnings in ui package

Remove unused variables and improve JSON decoding in
saveEnclosureProgression()
This commit is contained in:
Frédéric Guillot 2024-03-15 19:28:38 -07:00
parent 309fdbb9fc
commit f6f63b5282
2 changed files with 8 additions and 17 deletions

View file

@ -57,7 +57,7 @@ func (u WebAuthnUser) WebAuthnCredentials() []webauthn.Credential {
return creds
}
func newWebAuthn(h *handler) (*webauthn.WebAuthn, error) {
func newWebAuthn() (*webauthn.WebAuthn, error) {
url, err := url.Parse(config.Opts.BaseURL())
if err != nil {
return nil, err
@ -70,7 +70,7 @@ func newWebAuthn(h *handler) (*webauthn.WebAuthn, error) {
}
func (h *handler) beginRegistration(w http.ResponseWriter, r *http.Request) {
web, err := newWebAuthn(h)
web, err := newWebAuthn()
if err != nil {
json.ServerError(w, r, err)
return
@ -117,7 +117,7 @@ func (h *handler) beginRegistration(w http.ResponseWriter, r *http.Request) {
}
func (h *handler) finishRegistration(w http.ResponseWriter, r *http.Request) {
web, err := newWebAuthn(h)
web, err := newWebAuthn()
if err != nil {
json.ServerError(w, r, err)
return
@ -152,7 +152,7 @@ func (h *handler) finishRegistration(w http.ResponseWriter, r *http.Request) {
}
func (h *handler) beginLogin(w http.ResponseWriter, r *http.Request) {
web, err := newWebAuthn(h)
web, err := newWebAuthn()
if err != nil {
json.ServerError(w, r, err)
return
@ -195,7 +195,7 @@ func (h *handler) beginLogin(w http.ResponseWriter, r *http.Request) {
}
func (h *handler) finishLogin(w http.ResponseWriter, r *http.Request) {
web, err := newWebAuthn(h)
web, err := newWebAuthn()
if err != nil {
json.ServerError(w, r, err)
return