mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
Refactor HTTP Client and LocalizedError packages
This commit is contained in:
parent
120aabfbce
commit
14e25ab9fe
104 changed files with 1277 additions and 10672 deletions
|
@ -6,7 +6,7 @@ package form // import "miniflux.app/v2/internal/ui/form"
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"miniflux.app/v2/internal/errors"
|
||||
"miniflux.app/v2/internal/locale"
|
||||
)
|
||||
|
||||
// APIKeyForm represents the API Key form.
|
||||
|
@ -15,9 +15,9 @@ type APIKeyForm struct {
|
|||
}
|
||||
|
||||
// Validate makes sure the form values are valid.
|
||||
func (a APIKeyForm) Validate() error {
|
||||
func (a APIKeyForm) Validate() *locale.LocalizedError {
|
||||
if a.Description == "" {
|
||||
return errors.NewLocalizedError("error.fields_mandatory")
|
||||
return locale.NewLocalizedError("error.fields_mandatory")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue