mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 18:20:50 +00:00
added BatchDelete action
This commit is contained in:
@@ -139,10 +139,11 @@ func UpdateConfig(c *gin.Context) {
|
||||
// @Router /api/v1/config/{configId} [delete]
|
||||
func DeleteConfig(c *gin.Context) {
|
||||
var data models.SysConfig
|
||||
id, err := tools.StringToInt(c.Param("configId"))
|
||||
data.UpdateBy = tools.GetUserIdStr(c)
|
||||
data.ConfigId = id
|
||||
_, err = data.Delete()
|
||||
IDS := tools.IdsStrToIdsIntGroup("configId", c)
|
||||
result, err := data.BatchDelete(IDS)
|
||||
tools.HasError(err, "修改失败", 500)
|
||||
app.OK(c, nil, msg.DeletedSuccess)
|
||||
app.OK(c, result, msg.DeletedSuccess)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user