feat(api): permission

This commit is contained in:
ttk
2024-09-23 18:02:14 +08:00
parent 03eec7abbc
commit 78199b7ba6
20 changed files with 494 additions and 143 deletions

View File

@@ -104,7 +104,7 @@ func (c *Controller) CreateGateway(ctx *gin.Context) {
// @Success 200 {object} HttpResponse
// @Router /gateway/:id [delete]
func (c *Controller) DeleteGateway(ctx *gin.Context) {
doDelete(ctx, true, &model.Gateway{}, gatewayDcs...)
doDelete(ctx, true, &model.Gateway{}, conf.RESOURCE_GATEWAY,gatewayDcs...)
}
// UpdateGateway godoc
@@ -115,7 +115,7 @@ func (c *Controller) DeleteGateway(ctx *gin.Context) {
// @Success 200 {object} HttpResponse
// @Router /gateway/:id [put]
func (c *Controller) UpdateGateway(ctx *gin.Context) {
doUpdate(ctx, true, &model.Gateway{}, gatewayPreHooks...)
doUpdate(ctx, true, &model.Gateway{}, conf.RESOURCE_GATEWAY,gatewayPreHooks...)
}
// GetGateways godoc