aboutsummaryrefslogtreecommitdiff
path: root/internal/ui/form/api_key.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <f@miniflux.net> 2023-10-21 19:50:29 -0700
committerGravatar Frédéric Guillot <f@miniflux.net> 2023-10-22 13:09:30 -0700
commit14e25ab9fe09b9951b38e56af2bdff7a0737b280 (patch)
tree1e466305ccf868d0253b09895af29f811a3e3393 /internal/ui/form/api_key.go
parent120aabfbcef4ef453d70861aece3b107b603a911 (diff)
downloadv2-14e25ab9fe09b9951b38e56af2bdff7a0737b280.tar.gz
v2-14e25ab9fe09b9951b38e56af2bdff7a0737b280.tar.zst
v2-14e25ab9fe09b9951b38e56af2bdff7a0737b280.zip
Refactor HTTP Client and LocalizedError packages
Diffstat (limited to 'internal/ui/form/api_key.go')
-rw-r--r--internal/ui/form/api_key.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/ui/form/api_key.go b/internal/ui/form/api_key.go
index 1eb754bc..b87322a5 100644
--- a/internal/ui/form/api_key.go
+++ b/internal/ui/form/api_key.go
@@ -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