feat: fixed bug for wechat bot to parse transactions. enable user to exchange reward with img_calls

This commit is contained in:
RockYang
2024-01-03 11:15:54 +08:00
parent ff4515bbf1
commit b5641be30d
15 changed files with 166 additions and 55 deletions

View File

@@ -55,3 +55,16 @@ func (h *RewardHandler) List(c *gin.Context) {
resp.SUCCESS(c, rewards)
}
func (h *RewardHandler) Remove(c *gin.Context) {
id := h.GetInt(c, "id", 0)
if id > 0 {
res := h.db.Where("id = ?", id).Delete(&model.Reward{})
if res.Error != nil {
resp.ERROR(c, "更新数据库失败!")
return
}
}
resp.SUCCESS(c)
}