This is an automated email from the ASF dual-hosted git repository.

kumfo pushed a commit to branch feat/1.8.0/menu
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/feat/1.8.0/menu by this push:
     new 60f8cd18 feat(siteinfo): add site_security to response structure and 
update related schemas
60f8cd18 is described below

commit 60f8cd1803ed707c87caf9fe394cdaec55511478
Author: kumfo <[email protected]>
AuthorDate: Thu Jan 22 10:59:28 2026 +0800

    feat(siteinfo): add site_security to response structure and update related 
schemas
---
 docs/docs.go                               | 3 +++
 docs/swagger.json                          | 3 +++
 docs/swagger.yaml                          | 2 ++
 internal/controller/siteinfo_controller.go | 3 +++
 internal/schema/siteinfo_schema.go         | 1 +
 5 files changed, 12 insertions(+)

diff --git a/docs/docs.go b/docs/docs.go
index c624133b..23398e50 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -10996,6 +10996,9 @@ const docTemplate = `{
                 "site_questions": {
                     "$ref": "#/definitions/schema.SiteQuestionsResp"
                 },
+                "site_security": {
+                    "$ref": "#/definitions/schema.SiteSecurityResp"
+                },
                 "site_seo": {
                     "$ref": "#/definitions/schema.SiteSeoResp"
                 },
diff --git a/docs/swagger.json b/docs/swagger.json
index 58f38579..b9dc0b0b 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -10988,6 +10988,9 @@
                 "site_questions": {
                     "$ref": "#/definitions/schema.SiteQuestionsResp"
                 },
+                "site_security": {
+                    "$ref": "#/definitions/schema.SiteSecurityResp"
+                },
                 "site_seo": {
                     "$ref": "#/definitions/schema.SiteSeoResp"
                 },
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 39235a33..4a680ec4 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -2219,6 +2219,8 @@ definitions:
         $ref: '#/definitions/schema.SiteLegalSimpleResp'
       site_questions:
         $ref: '#/definitions/schema.SiteQuestionsResp'
+      site_security:
+        $ref: '#/definitions/schema.SiteSecurityResp'
       site_seo:
         $ref: '#/definitions/schema.SiteSeoResp'
       site_tags:
diff --git a/internal/controller/siteinfo_controller.go 
b/internal/controller/siteinfo_controller.go
index 64aa02ce..320c1b47 100644
--- a/internal/controller/siteinfo_controller.go
+++ b/internal/controller/siteinfo_controller.go
@@ -107,6 +107,9 @@ func (sc *SiteInfoController) GetSiteInfo(ctx *gin.Context) 
{
        if legal, err := sc.siteInfoService.GetSiteSecurity(ctx); err == nil {
                resp.Legal = 
&schema.SiteLegalSimpleResp{ExternalContentDisplay: 
legal.ExternalContentDisplay}
        }
+       if security, err := sc.siteInfoService.GetSiteSecurity(ctx); err == nil 
{
+               resp.Security = security
+       }
 
        handler.HandleResponse(ctx, nil, resp)
 }
diff --git a/internal/schema/siteinfo_schema.go 
b/internal/schema/siteinfo_schema.go
index b2d2c4b3..19382d10 100644
--- a/internal/schema/siteinfo_schema.go
+++ b/internal/schema/siteinfo_schema.go
@@ -324,6 +324,7 @@ type SiteInfoResp struct {
        Questions     *SiteQuestionsResp         `json:"site_questions"`
        Tags          *SiteTagsResp              `json:"site_tags"`
        Legal         *SiteLegalSimpleResp       `json:"site_legal"`
+       Security      *SiteSecurityResp          `json:"site_security"`
        Version       string                     `json:"version"`
        Revision      string                     `json:"revision"`
 }

Reply via email to