diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-03-12 19:14:51 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-03-12 19:14:51 +0300 |
| commit | 8b5fe0b018af70c5302966f1d3d4d9a1cdd82dad (patch) | |
| tree | 0beea2e09b894f4ca8c63bb5d09308d7bb4b048a /sub/sub.go | |
| parent | fc23af5db651b7a86252298862509635ace161b3 (diff) | |
[subJson] add mux and direct
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'sub/sub.go')
| -rw-r--r-- | sub/sub.go | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -92,9 +92,21 @@ func (s *Server) initRouter() (*gin.Engine, error) { SubJsonFragment = "" } + SubJsonMux, err := s.settingService.GetSubJsonMux() + if err != nil { + SubJsonMux = "" + } + + SubJsonRules, err := s.settingService.GetSubJsonRules() + if err != nil { + SubJsonRules = "" + } + g := engine.Group("/") - s.sub = NewSUBController(g, LinksPath, JsonPath, Encrypt, ShowInfo, RemarkModel, SubUpdates, SubJsonFragment) + s.sub = NewSUBController( + g, LinksPath, JsonPath, Encrypt, ShowInfo, RemarkModel, SubUpdates, + SubJsonFragment, SubJsonMux, SubJsonRules) return engine, nil } |
