优化代码

This commit is contained in:
root 2022-05-30 09:16:43 +08:00
parent 522be82a31
commit 625e4eecf4
1 changed files with 3 additions and 6 deletions

View File

@ -202,14 +202,11 @@ func SetPostAuthXml(g *dbdata.Group, w http.ResponseWriter) error {
return err
}
var result bytes.Buffer
_ = tmpl.Execute(&result, g)
err = tmpl.Execute(&result, g)
if err != nil {
return err
}
if result.String() != "" {
HttpSetHeader(w, "X-CSTP-Post-Auth-XML", result.String())
base.Info(result.String())
}
HttpSetHeader(w, "X-CSTP-Post-Auth-XML", result.String())
return nil
}
@ -229,4 +226,4 @@ var ds_domains_xml = `
</opaque>
</config>
</config-auth>
`
`