File tree Expand file tree Collapse file tree 5 files changed +19
-14
lines changed Expand file tree Collapse file tree 5 files changed +19
-14
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " nginx-ui-frontend" ,
3- "version" : " 1.2.0 " ,
3+ "version" : " 1.2.2 " ,
44 "private" : true ,
55 "scripts" : {
66 "serve" : " vue-cli-service serve" ,
Original file line number Diff line number Diff line change 66 < meta content ="width=device-width,initial-scale=1.0,user-scalable=0 " name ="viewport ">
77 < link href ="<%= BASE_URL %>favicon.ico " rel ="icon ">
88 < title > < %= htmlWebpackPlugin.options.title %> </ title >
9+ < style type ="text/css ">
10+ body {
11+ width : 100% !important ;
12+ }
13+ </ style >
914</ head >
1015< body >
1116< noscript >
Original file line number Diff line number Diff line change 1- {"version" :" 1.2.0 " ,"build_id" :8 ,"total_build" :48 }
1+ {"version" :" 1.2.2 " ,"build_id" :1 ,"total_build" :49 }
Original file line number Diff line number Diff line change @@ -24,22 +24,17 @@ type ValidError struct {
2424 Message string
2525}
2626
27- var trans ut.Translator
28-
29- func init () {
30- uni := ut .New (zh .New ())
31- trans , _ = uni .GetTranslator ("zh" )
32- v , ok := binding .Validator .Engine ().(* val.Validate )
33- if ok {
34- _ = zhTranslations .RegisterDefaultTranslations (v , trans )
35- }
36- }
37-
3827func BindAndValid (c * gin.Context , target interface {}) bool {
3928 errs := make (map [string ]string )
4029 err := c .ShouldBindJSON (target )
4130 if err != nil {
4231 log .Println ("raw err" , err )
32+ uni := ut .New (zh .New ())
33+ trans , _ := uni .GetTranslator ("zh" )
34+ v , ok := binding .Validator .Engine ().(* val.Validate )
35+ if ok {
36+ _ = zhTranslations .RegisterDefaultTranslations (v , trans )
37+ }
4338
4439 verrs , ok := err .(val.ValidationErrors )
4540
Original file line number Diff line number Diff line change @@ -14,7 +14,12 @@ import (
1414func CertInfo (c * gin.Context ) {
1515 domain := c .Param ("domain" )
1616
17- key := tool .GetCertInfo (domain )
17+ key , err := tool .GetCertInfo (domain )
18+
19+ if err != nil {
20+ ErrHandler (c , err )
21+ return
22+ }
1823
1924 c .JSON (http .StatusOK , gin.H {
2025 "subject_name" : key .Subject .CommonName ,
You can’t perform that action at this time.
0 commit comments