Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sub/sub.go')
-rw-r--r--sub/sub.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/sub/sub.go b/sub/sub.go
index 26dbcd2c..8fe025bc 100644
--- a/sub/sub.go
+++ b/sub/sub.go
@@ -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
}