diff options
Diffstat (limited to 'web/entity/entity.go')
| -rw-r--r-- | web/entity/entity.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/web/entity/entity.go b/web/entity/entity.go index 8ab06399..06850128 100644 --- a/web/entity/entity.go +++ b/web/entity/entity.go @@ -48,6 +48,9 @@ type AllSetting struct { SubEncrypt bool `json:"subEncrypt" form:"subEncrypt"` SubShowInfo bool `json:"subShowInfo" form:"subShowInfo"` SubURI string `json:"subURI" form:"subURI"` + SubJsonPath string `json:"subJsonPath" form:"subJsonPath"` + SubJsonURI string `json:"subJsonURI" form:"subJsonURI"` + SubJsonFragment string `json:"subJsonFragment" form:"subJsonFragment"` Datepicker string `json:"datepicker" form:"datepicker"` } @@ -105,6 +108,13 @@ func (s *AllSetting) CheckValid() error { s.SubPath += "/" } + if !strings.HasPrefix(s.SubJsonPath, "/") { + s.SubJsonPath = "/" + s.SubJsonPath + } + if !strings.HasSuffix(s.SubJsonPath, "/") { + s.SubJsonPath += "/" + } + _, err := time.LoadLocation(s.TimeLocation) if err != nil { return common.NewError("time location not exist:", s.TimeLocation) |
