This commit is contained in:
Liang Ding 2022-12-04 00:10:36 +08:00
parent c90ca948c4
commit a5ebb85862
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 39 additions and 0 deletions

View file

@ -25,6 +25,24 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func removeCriterion(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
name := arg["name"].(string)
err := model.RemoveCriterion(name)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
return
}
}
func setCriterion(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)