mirror of
https://github.com/moul/sshportal.git
synced 2025-01-11 09:59:39 +08:00
Fix UserKey.Key for govalidator.ValidateStruct.
UserKey.Key is a []byte field. The valid: "required" would cause wrong Validation.
This commit is contained in:
parent
3d5101011f
commit
eebf987900
1 changed files with 1 additions and 1 deletions
2
db.go
2
db.go
|
@ -70,7 +70,7 @@ type Host struct {
|
||||||
// UserKey defines a user public key used by sshportal to identify the user
|
// UserKey defines a user public key used by sshportal to identify the user
|
||||||
type UserKey struct {
|
type UserKey struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
Key []byte `sql:"size:10000" valid:"required,length(1|10000)"`
|
Key []byte `sql:"size:10000" valid:"length(1|10000)"`
|
||||||
AuthorizedKey string `sql:"size:10000" valid:"required,length(1|10000)"`
|
AuthorizedKey string `sql:"size:10000" valid:"required,length(1|10000)"`
|
||||||
UserID uint ``
|
UserID uint ``
|
||||||
User *User `gorm:"ForeignKey:UserID"`
|
User *User `gorm:"ForeignKey:UserID"`
|
||||||
|
|
Loading…
Reference in a new issue