MCPcopy Index your code
hub / github.com/apache/answer / SiteInfo

Method SiteInfo

internal/controller/template_controller.go:106–135  ·  view source on GitHub ↗
(ctx *gin.Context)

Source from the content-addressed store, hash-verified

104 return
105}
106func (tc *TemplateController) SiteInfo(ctx *gin.Context) *schema.TemplateSiteInfoResp {
107 var err error
108 resp := &schema.TemplateSiteInfoResp{}
109 resp.General, err = tc.siteInfoService.GetSiteGeneral(ctx)
110 if err != nil {
111 log.Error(err)
112 }
113 SiteUrl = resp.General.SiteUrl
114 resp.Interface, err = tc.siteInfoService.GetSiteInterface(ctx)
115 if err != nil {
116 log.Error(err)
117 }
118
119 resp.Branding, err = tc.siteInfoService.GetSiteBranding(ctx)
120 if err != nil {
121 log.Error(err)
122 }
123
124 resp.SiteSeo, err = tc.siteInfoService.GetSiteSeo(ctx)
125 if err != nil {
126 log.Error(err)
127 }
128
129 resp.CustomCssHtml, err = tc.siteInfoService.GetSiteCustomCssHTML(ctx)
130 if err != nil {
131 log.Error(err)
132 }
133 resp.Year = fmt.Sprintf("%d", time.Now().Year())
134 return resp
135}
136
137// Index question list
138func (tc *TemplateController) Index(ctx *gin.Context) {

Callers 7

IndexMethod · 0.95
QuestionListMethod · 0.95
QuestionInfoMethod · 0.95
TagListMethod · 0.95
TagInfoMethod · 0.95
UserInfoMethod · 0.95
Page404Method · 0.95

Calls 5

GetSiteGeneralMethod · 0.65
GetSiteInterfaceMethod · 0.65
GetSiteBrandingMethod · 0.65
GetSiteSeoMethod · 0.65
GetSiteCustomCssHTMLMethod · 0.65

Tested by

no test coverage detected