mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-04-11 18:55:22 +08:00
优化代码
This commit is contained in:
@@ -31,7 +31,7 @@ func (this *ExportDownloadAction) RunGet(params struct {
|
||||
if ok {
|
||||
this.AddHeader("Content-Disposition", "attachment; filename=\"WAF-"+types.String(params.PolicyId)+".json\";")
|
||||
this.AddHeader("Content-Length", strconv.Itoa(len(data)))
|
||||
this.Write(data)
|
||||
_, _ = this.Write(data)
|
||||
} else {
|
||||
this.WriteString("找不到要导出的内容")
|
||||
return
|
||||
|
||||
@@ -52,6 +52,10 @@ func (this *SortSetsAction) RunPost(params struct {
|
||||
FirewallRuleGroupId: params.GroupId,
|
||||
FirewallRuleSetsJSON: newRefsJSON,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
|
||||
this.Success()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user