This commit is contained in:
tsmethurst 2021-09-02 12:24:18 +02:00
parent cc7a35ee92
commit 5d5327614d
3 changed files with 19 additions and 17 deletions

View file

@ -24,20 +24,20 @@ import (
)
const (
users = "users"
actors = "actors"
statuses = "statuses"
inbox = "inbox"
outbox = "outbox"
followers = "followers"
following = "following"
liked = "liked"
collections = "collections"
featured = "featured"
publicKey = "main-key"
follow = "follow"
update = "updates"
blocks = "blocks"
users = "users"
actors = "actors"
statuses = "statuses"
inbox = "inbox"
outbox = "outbox"
followers = "followers"
following = "following"
liked = "liked"
// collections = "collections"
// featured = "featured"
publicKey = "main-key"
follow = "follow"
// update = "updates"
blocks = "blocks"
)
const (

View file

@ -38,8 +38,8 @@ const (
maximumDescriptionLength = 5000
maximumSiteTermsLength = 5000
maximumUsernameLength = 64
maximumEmojiShortcodeLength = 30
maximumHashtagLength = 30
// maximumEmojiShortcodeLength = 30
// maximumHashtagLength = 30
)
// NewPassword returns an error if the given password is not sufficiently strong, or nil if it's ok.

View file

@ -46,7 +46,9 @@ func ulidValidator(fl validator.FieldLevel) bool {
func init() {
v = validator.New()
v.RegisterValidation("ulid", ulidValidator)
if err := v.RegisterValidation("ulid", ulidValidator); err != nil {
panic(err)
}
}
// Struct validates the passed struct, returning validator.ValidationErrors if invalid, or nil if OK.