diff options
| author | Alireza Ahmadi <alireza7@gmail.com> | 2023-12-05 20:13:36 +0300 |
|---|---|---|
| committer | Alireza Ahmadi <alireza7@gmail.com> | 2023-12-05 20:20:44 +0300 |
| commit | c419eadf15630518606ab434387079172070d340 (patch) | |
| tree | 1933bd5868840cbc85c2b289523f57c22491b7b9 /web/controller | |
| parent | 4d3bea48e11883f0fb99f2e4bb8d943fe162c687 (diff) | |
xray setting enhancements #1286
Diffstat (limited to 'web/controller')
| -rw-r--r-- | web/controller/xraySetting.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/web/controller/xraySetting.go b/web/controller/xraySetting.go index d244d030..a4c8b600 100644 --- a/web/controller/xraySetting.go +++ b/web/controller/xraySetting.go @@ -9,6 +9,7 @@ import ( type XraySettingController struct { XraySettingService service.XraySettingService SettingService service.SettingService + InboundService service.InboundService } func NewXraySettingController(g *gin.RouterGroup) *XraySettingController { @@ -31,7 +32,13 @@ func (a *XraySettingController) getXraySetting(c *gin.Context) { jsonMsg(c, I18nWeb(c, "pages.settings.toasts.getSettings"), err) return } - jsonObj(c, xraySetting, nil) + inboundTags, err := a.InboundService.GetInboundTags() + if err != nil { + jsonMsg(c, I18nWeb(c, "pages.settings.toasts.getSettings"), err) + return + } + xrayResponse := "{ \"xraySetting\": " + xraySetting + ", \"inboundTags\": " + inboundTags + " }" + jsonObj(c, xrayResponse, nil) } func (a *XraySettingController) updateSetting(c *gin.Context) { |
