Skip to content

Commit

Permalink
- Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
KiselevAlexander committed Feb 7, 2025
1 parent f79602a commit 707d006
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions web/controller/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,55 +150,55 @@ func (a *InboundController) updateInbound(c *gin.Context) {
func (a *InboundController) getInboundClients(c *gin.Context) {
id, err := strconv.Atoi(c.Param("id"))
if err != nil {
jsonMsg(c, "GetInboundClients", errors.New("Incorrect inbound id"))
return
jsonMsg(c, "GetInboundClients", errors.New("Incorrect inbound id"))
return
}

client, err := a.inboundService.GetInboundClients(id)
if err != nil {
jsonMsg(c, "GetInboundClientById", err)
return
client, err := a.inboundService.GetInboundClients(id)
if err != nil {
jsonMsg(c, "GetInboundClientById", err)
return
}

jsonObj(c, client, nil)
jsonObj(c, client, nil)
}

func (a *InboundController) getClientById(c *gin.Context) {
id, err := strconv.Atoi(c.Param("id"))
if err != nil {
jsonMsg(c, "GetInboundClientById", errors.New("Incorrect inbound id"))
jsonMsg(c, "GetInboundClientById", errors.New("Incorrect inbound id"))
return
}

client, err := a.inboundService.GetInboundClientById(id, c.Param("clientId"))
if err != nil {
jsonMsg(c, "GetInboundClientById", err)
return
client, err := a.inboundService.GetInboundClientById(id, c.Param("clientId"))
if err != nil {
jsonMsg(c, "GetInboundClientById", err)
return
}
if client == nil {
jsonMsg(c, "GetInboundClientById", errors.New("Client not found"))
return
if client == nil {
jsonMsg(c, "GetInboundClientById", errors.New("Client not found"))
return
}
jsonObj(c, client, nil)
jsonObj(c, client, nil)
}

func (a *InboundController) getClientByEmail(c *gin.Context) {
id, err := strconv.Atoi(c.Param("id"))
if err != nil {
jsonMsg(c, "GetInboundClientByEmail", errors.New("Incorrect inbound id"))
return
jsonMsg(c, "GetInboundClientByEmail", errors.New("Incorrect inbound id"))
return
}

client, err := a.inboundService.GetInboundClientByEmail(id, c.Param("email"))
if err != nil {
jsonMsg(c, "GetInboundClientByEmail", err)
return
}
if client == nil {
jsonMsg(c, "GetInboundClientByEmail", errors.New("Client not found"))
return
}
jsonObj(c, client, nil)
client, err := a.inboundService.GetInboundClientByEmail(id, c.Param("email"))
if err != nil {
jsonMsg(c, "GetInboundClientByEmail", err)
return
}
if client == nil {
jsonMsg(c, "GetInboundClientByEmail", errors.New("Client not found"))
return
}
jsonObj(c, client, nil)
}

func (a *InboundController) getClientIps(c *gin.Context) {
Expand Down

0 comments on commit 707d006

Please sign in to comment.