summaryrefslogtreecommitdiff
path: root/internal/api/client/app/appcreate.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/app/appcreate.go')
-rw-r--r--internal/api/client/app/appcreate.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/api/client/app/appcreate.go b/internal/api/client/app/appcreate.go
index 641357d42..c79c528d9 100644
--- a/internal/api/client/app/appcreate.go
+++ b/internal/api/client/app/appcreate.go
@@ -92,26 +92,26 @@ func (m *Module) AppsPOSTHandler(c *gin.Context) {
return
}
- if len(form.ClientName) > formFieldLen {
- err := fmt.Errorf("client_name must be less than %d bytes", formFieldLen)
+ if len([]rune(form.ClientName)) > formFieldLen {
+ err := fmt.Errorf("client_name must be less than %d characters", formFieldLen)
api.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGet)
return
}
- if len(form.RedirectURIs) > formRedirectLen {
- err := fmt.Errorf("redirect_uris must be less than %d bytes", formRedirectLen)
+ if len([]rune(form.RedirectURIs)) > formRedirectLen {
+ err := fmt.Errorf("redirect_uris must be less than %d characters", formRedirectLen)
api.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGet)
return
}
- if len(form.Scopes) > formFieldLen {
- err := fmt.Errorf("scopes must be less than %d bytes", formFieldLen)
+ if len([]rune(form.Scopes)) > formFieldLen {
+ err := fmt.Errorf("scopes must be less than %d characters", formFieldLen)
api.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGet)
return
}
- if len(form.Website) > formFieldLen {
- err := fmt.Errorf("website must be less than %d bytes", formFieldLen)
+ if len([]rune(form.Website)) > formFieldLen {
+ err := fmt.Errorf("website must be less than %d characters", formFieldLen)
api.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGet)
return
}