This commit is contained in:
Liang Ding 2023-03-23 19:29:36 +08:00
parent e952a57f00
commit 984615fbc1
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 29 additions and 1 deletions

View file

@ -108,6 +108,24 @@ func searchWidget(c *gin.Context) {
}
}
func removeTemplate(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
path := arg["path"].(string)
err := model.RemoveTemplate(path)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
return
}
}
func searchTemplate(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)