Skip to content

Commit

Permalink
bug fixed (extra enter on client_email)
Browse files Browse the repository at this point in the history
  • Loading branch information
MHSanaei committed Mar 25, 2023
1 parent f56dd43 commit e2fd84a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions web/job/check_clinet_ip_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,16 @@ func GetInboundClientIps(clientEmail string) (*model.InboundClientIps, error) {
}
return InboundClientIps, nil
}
func addInboundClientIps(clientEmail string,ips []string) error {
func addInboundClientIps(clientEmail string, ips []string) error {
inboundClientIps := &model.InboundClientIps{}
jsonIps, err := json.Marshal(ips)
jsonIps, err := json.Marshal(ips)
checkError(err)

// Trim any leading/trailing whitespace from clientEmail
clientEmail = strings.TrimSpace(clientEmail)

inboundClientIps.ClientEmail = clientEmail
inboundClientIps.Ips = string(jsonIps)


db := database.GetDB()
tx := db.Begin()
Expand Down

0 comments on commit e2fd84a

Please sign in to comment.