@@ -42,7 +42,7 @@ func Build(c *gin.Context) { | |||||
// @Accept json | // @Accept json | ||||
// @Produce json | // @Produce json | ||||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | // @param Authorization header string true "验证参数Bearer和token空格拼接" | ||||
// @Param req body md.ArticleDelReq true "(分页信息必填)" | |||||
// @Param req body md.CloudBundleDelReq true "(分页信息必填)" | |||||
// @Success 200 {string} "具体数据" | // @Success 200 {string} "具体数据" | ||||
// @Failure 400 {object} md.Response "具体错误" | // @Failure 400 {object} md.Response "具体错误" | ||||
// @Router /api/cloudBundle/del [post] | // @Router /api/cloudBundle/del [post] | ||||
@@ -93,6 +93,10 @@ type Guide struct { | |||||
type AuditClearReq struct { | type AuditClearReq struct { | ||||
Os string `json:"os" example:"1-安卓 2-ios"` | Os string `json:"os" example:"1-安卓 2-ios"` | ||||
} | } | ||||
type CloudBundleDelReq struct { | |||||
Ids []string `json:"ids"` | |||||
} | |||||
type CloudBundleVersion struct { | type CloudBundleVersion struct { | ||||
Type string `json:"type"` | Type string `json:"type"` | ||||
Img string `json:"img"` | Img string `json:"img"` | ||||
@@ -175,12 +175,12 @@ func getcurl(url string) (string, error) { | |||||
return string(body), nil | return string(body), nil | ||||
} | } | ||||
func Del(c *gin.Context) { | func Del(c *gin.Context) { | ||||
var req *md.ArticleDelReq | |||||
var req *md.CloudBundleDelReq | |||||
if err := c.ShouldBindJSON(&req); err != nil { | if err := c.ShouldBindJSON(&req); err != nil { | ||||
e.OutErr(c, e.ERR_INVALID_ARGS, err) | e.OutErr(c, e.ERR_INVALID_ARGS, err) | ||||
return | return | ||||
} | } | ||||
db.Db.In("id", req.Id).Delete(&model.CloudBundle{}) | |||||
db.Db.In("id", req.Ids).Delete(&model.CloudBundle{}) | |||||
e.OutSuc(c, "success", nil) | e.OutSuc(c, "success", nil) | ||||
return | return | ||||
} | } | ||||