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:
parent
309fdbb9fc
commit
f6f63b5282
2 changed files with 8 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue