File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package controllers
2
2
3
3
import (
4
4
"context"
5
+ "strings"
5
6
"sync"
6
7
7
8
_ "github.com/cirnum/loadtester/server/app/models"
@@ -60,6 +61,9 @@ func AddServer(c *fiber.Ctx) error {
60
61
}
61
62
62
63
serverPayload .UserID = c .Locals ("userId" ).(string )
64
+ serverPayload .IP = strings .Trim (serverPayload .IP , " /" )
65
+ serverPayload .Enabled = true
66
+
63
67
if pkgUtils .SendMasterIp (serverPayload .IP ) {
64
68
serverPayload .Active = true
65
69
}
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ const (
33
33
)
34
34
35
35
func SendMasterIp (publicIp string ) bool {
36
+ publicIp = strings .Trim (publicIp , " /" )
36
37
var url string
37
38
hostDetails := & reqModels.MasterDetails {
38
39
Address : configs .ConfigProvider .HostUrl ,
You can’t perform that action at this time.
0 commit comments