This commit is contained in:
Liang Ding 2022-12-22 10:38:15 +08:00
parent 7a30dea880
commit fecd965dfb
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 43 additions and 4 deletions

View file

@ -113,6 +113,25 @@ func addRiffCards(c *gin.Context) {
}
}
func renameRiffDeck(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, ok := util.JsonArg(c, ret)
if !ok {
return
}
deckID := arg["deckID"].(string)
name := arg["name"].(string)
err := model.RenameDeck(deckID, name)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
return
}
}
func createRiffDeck(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)