diff options
| author | 2021-08-30 13:38:06 +0200 | |
|---|---|---|
| committer | 2021-08-30 13:38:06 +0200 | |
| commit | 6adec1ae4d95489e4e11c3dfc3be15a634b3a60f (patch) | |
| tree | 0f123565cdaafac55425eeb9171dd0ef988c6a63 /internal/gtsmodel/routersession.go | |
| parent | Merge branch 'struct_validation' of github.com:superseriousbusiness/gotosocia... (diff) | |
| download | gotosocial-6adec1ae4d95489e4e11c3dfc3be15a634b3a60f.tar.xz | |
more work on struct validation
Diffstat (limited to 'internal/gtsmodel/routersession.go')
| -rw-r--r-- | internal/gtsmodel/routersession.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/gtsmodel/routersession.go b/internal/gtsmodel/routersession.go index fbc1c7768..374264fe4 100644 --- a/internal/gtsmodel/routersession.go +++ b/internal/gtsmodel/routersession.go @@ -20,7 +20,7 @@ package gtsmodel // RouterSession is used to store and retrieve settings for a router session. type RouterSession struct { - ID string `bun:"type:CHAR(26),pk,notnull"` - Auth []byte `bun:"type:bytea,notnull,nullzero"` - Crypt []byte `bun:"type:bytea,notnull,nullzero"` + ID string `validate:"required,ulid" bun:"type:CHAR(26),pk,nullzero,notnull"` + Auth []byte `validate:"required,len=32" bun:"type:bytea,notnull,nullzero"` + Crypt []byte `validate:"required,len=32" bun:"type:bytea,notnull,nullzero"` } |
