feat(ui): 后端加权限验证

This commit is contained in:
吴汉强
2024-03-14 15:39:12 +08:00
parent a64df5cf0c
commit af5afd7700
16 changed files with 135 additions and 7 deletions

View File

@@ -24,6 +24,11 @@ func NewRewardHandler(app *core.AppServer, db *gorm.DB) *RewardHandler {
}
func (h *RewardHandler) List(c *gin.Context) {
if err := utils.CheckPermission(c, h.db); err != nil {
resp.ERROR(c, types.NoPermission)
return
}
var items []model.Reward
res := h.db.Order("id DESC").Find(&items)
var rewards = make([]vo.Reward, 0)