add asterisk to required fields, allow editing of device keys

This commit is contained in:
Christoph Haas
2020-12-18 22:26:36 +01:00
parent ec60dd136a
commit d978fd560d
6 changed files with 46 additions and 24 deletions

View File

@@ -202,7 +202,7 @@ type Device struct {
Interface *wgtypes.Device `gorm:"-"`
DeviceName string `form:"device" gorm:"primaryKey" binding:"required,alphanum"`
PrivateKey string `form:"privkey" binding:"base64"`
PrivateKey string `form:"privkey" binding:"required,base64"`
PublicKey string `form:"pubkey" binding:"required,base64"`
PersistentKeepalive int `form:"keepalive" binding:"gte=0"`
ListenPort int `form:"port" binding:"required,gt=0"`