chore: drop "oidc_wellknown" tmpl, use json directly (#38731)

`testOAuth2WellKnown` already covers the endpoint's response.
This commit is contained in:
wxiaoguang
2026-07-31 18:32:01 +02:00
committed by GitHub
parent f0a95eebe3
commit 76a787a79d
9 changed files with 81 additions and 90 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ func (b *Base) HTTPError(status int, contents ...string) {
func (b *Base) JSON(status int, content any) {
b.Resp.Header().Set("Content-Type", "application/json;charset=utf-8")
b.Resp.WriteHeader(status)
if err := json.NewEncoder(b.Resp).Encode(content); err != nil {
if err := json.MarshalWrite(b.Resp, content); err != nil {
log.Error("Render JSON failed: %v", err)
}
}