|
|
@@ -7,16 +7,28 @@ import ( |
|
|
|
"applet/app/db" |
|
|
|
"applet/app/e" |
|
|
|
"applet/app/enum" |
|
|
|
"fmt" |
|
|
|
"github.com/gin-gonic/gin" |
|
|
|
) |
|
|
|
|
|
|
|
func AesDecrypt(c *gin.Context) { |
|
|
|
var req md.CurlAesDecrypt |
|
|
|
err := c.ShouldBindJSON(&req) |
|
|
|
var arg interface{} |
|
|
|
err := c.ShouldBindJSON(&arg) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR_INVALID_ARGS, err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
fmt.Println(">>>>>>>>>>arg<<<<<<<<<<<<<", arg) |
|
|
|
c.BindJSON(arg) |
|
|
|
|
|
|
|
var req md.CurlAesDecrypt |
|
|
|
err = c.ShouldBindJSON(&req) |
|
|
|
if err != nil { |
|
|
|
err = validate.HandleValidateErr(err) |
|
|
|
err1 := err.(e.E) |
|
|
|
e.OutErr(c, err1.Code, err1.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
sysCfgDb := db.SysCfgDb{} |
|
|
|
sysCfgDb.Set() |
|
|
|
sysCfg := sysCfgDb.SysCfgFindWithDb(enum.OpenAppletAesKey) |
|
|
|