|
@@ -108,8 +108,7 @@ func (a *InboundController) addInbound(c *gin.Context) {
|
|
|
inbound.Tag = fmt.Sprintf("inbound-%v:%v", inbound.Listen, inbound.Port)
|
|
|
}
|
|
|
|
|
|
- needRestart := false
|
|
|
- inbound, needRestart, err = a.inboundService.AddInbound(inbound)
|
|
|
+ inbound, needRestart, err := a.inboundService.AddInbound(inbound)
|
|
|
if err != nil {
|
|
|
jsonMsg(c, I18nWeb(c, "somethingWentWrong"), err)
|
|
|
return
|
|
@@ -126,8 +125,7 @@ func (a *InboundController) delInbound(c *gin.Context) {
|
|
|
jsonMsg(c, I18nWeb(c, "pages.inbounds.toasts.inboundDeleteSuccess"), err)
|
|
|
return
|
|
|
}
|
|
|
- needRestart := true
|
|
|
- needRestart, err = a.inboundService.DelInbound(id)
|
|
|
+ needRestart, err := a.inboundService.DelInbound(id)
|
|
|
if err != nil {
|
|
|
jsonMsg(c, I18nWeb(c, "somethingWentWrong"), err)
|
|
|
return
|
|
@@ -152,8 +150,7 @@ func (a *InboundController) updateInbound(c *gin.Context) {
|
|
|
jsonMsg(c, I18nWeb(c, "pages.inbounds.toasts.inboundUpdateSuccess"), err)
|
|
|
return
|
|
|
}
|
|
|
- needRestart := true
|
|
|
- inbound, needRestart, err = a.inboundService.UpdateInbound(inbound)
|
|
|
+ inbound, needRestart, err := a.inboundService.UpdateInbound(inbound)
|
|
|
if err != nil {
|
|
|
jsonMsg(c, I18nWeb(c, "somethingWentWrong"), err)
|
|
|
return
|
|
@@ -195,9 +192,7 @@ func (a *InboundController) addInboundClient(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- needRestart := true
|
|
|
-
|
|
|
- needRestart, err = a.inboundService.AddInboundClient(data)
|
|
|
+ needRestart, err := a.inboundService.AddInboundClient(data)
|
|
|
if err != nil {
|
|
|
jsonMsg(c, I18nWeb(c, "somethingWentWrong"), err)
|
|
|
return
|
|
@@ -216,9 +211,7 @@ func (a *InboundController) delInboundClient(c *gin.Context) {
|
|
|
}
|
|
|
clientId := c.Param("clientId")
|
|
|
|
|
|
- needRestart := true
|
|
|
-
|
|
|
- needRestart, err = a.inboundService.DelInboundClient(id, clientId)
|
|
|
+ needRestart, err := a.inboundService.DelInboundClient(id, clientId)
|
|
|
if err != nil {
|
|
|
jsonMsg(c, I18nWeb(c, "somethingWentWrong"), err)
|
|
|
return
|
|
@@ -239,9 +232,7 @@ func (a *InboundController) updateInboundClient(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- needRestart := true
|
|
|
-
|
|
|
- needRestart, err = a.inboundService.UpdateInboundClient(inbound, clientId)
|
|
|
+ needRestart, err := a.inboundService.UpdateInboundClient(inbound, clientId)
|
|
|
if err != nil {
|
|
|
jsonMsg(c, I18nWeb(c, "somethingWentWrong"), err)
|
|
|
return
|