diff options
| author | Danil S. <135337715+sh1shd@users.noreply.github.com> | 2026-01-27 01:06:01 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-27 01:06:01 +0300 |
| commit | fd5f5917378129d7a555a246d42a2a572476b948 (patch) | |
| tree | f155bce5721c3d52840548192e3c683bbd193451 /sub/sub.go | |
| parent | 8a4c9a98cbf8efce7c2efd1e3daa4c996830b30c (diff) | |
feat: more subscription information fields (#3701)
* feat: more subscription information fields
* fix: incorrect translation
* feat: implement field for Happ custom routing rules
Diffstat (limited to 'sub/sub.go')
| -rw-r--r-- | sub/sub.go | 28 |
1 files changed, 27 insertions, 1 deletions
@@ -153,6 +153,31 @@ func (s *Server) initRouter() (*gin.Engine, error) { SubTitle = "" } + SubSupportUrl, err := s.settingService.GetSubSupportUrl() + if err != nil { + SubSupportUrl = "" + } + + SubProfileUrl, err := s.settingService.GetSubProfileUrl() + if err != nil { + SubProfileUrl = "" + } + + SubAnnounce, err := s.settingService.GetSubAnnounce() + if err != nil { + SubAnnounce = "" + } + + SubEnableRouting, err := s.settingService.GetSubEnableRouting() + if err != nil { + return nil, err + } + + SubRoutingRules, err := s.settingService.GetSubRoutingRules() + if err != nil { + SubRoutingRules = "" + } + // set per-request localizer from headers/cookies engine.Use(locale.LocalizerMiddleware()) @@ -231,7 +256,8 @@ func (s *Server) initRouter() (*gin.Engine, error) { s.sub = NewSUBController( g, LinksPath, JsonPath, subJsonEnable, Encrypt, ShowInfo, RemarkModel, SubUpdates, - SubJsonFragment, SubJsonNoises, SubJsonMux, SubJsonRules, SubTitle) + SubJsonFragment, SubJsonNoises, SubJsonMux, SubJsonRules, SubTitle, SubSupportUrl, + SubProfileUrl, SubAnnounce, SubEnableRouting, SubRoutingRules) return engine, nil } |
