From 7c1e5a6d864bdb575142649b88af1f8b1c66b953 Mon Sep 17 00:00:00 2001 From: afeiszli Date: Wed, 14 Jul 2021 16:49:57 -0400 Subject: [PATCH] fixed spacing --- functions/helpers.go | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/functions/helpers.go b/functions/helpers.go index 52f74b47e..389daf36a 100644 --- a/functions/helpers.go +++ b/functions/helpers.go @@ -55,33 +55,25 @@ func CreateServerToken(netID string) (string, error) { } var accessToken models.AccessToken - servervals := models.ServerConfig{ - APIConnString: "127.0.0.1" + servercfg.GetAPIPort(), - GRPCConnString: "127.0.0.1" + servercfg.GetGRPCPort(), - GRPCSSL: "off", + servervals := models.ServerConfig{ + APIConnString: "127.0.0.1" + servercfg.GetAPIPort(), + GRPCConnString: "127.0.0.1" + servercfg.GetGRPCPort(), + GRPCSSL: "off", } - accessToken.ServerConfig = servervals - accessToken.ClientConfig.Network = netID - accessToken.ClientConfig.Key = GenKey() + accessToken.ServerConfig = servervals + accessToken.ClientConfig.Network = netID + accessToken.ClientConfig.Key = GenKey() accesskey.Name = GenKeyName() accesskey.Value = GenKey() accesskey.Uses = 1 -<<<<<<< HEAD - privAddr := "" - if *network.IsLocal { - privAddr = network.LocalRange + tokenjson, err := json.Marshal(accessToken) + if err != nil { + return accesskey.AccessString, err } - accessstringdec := address + "|" + address + "|" + address + "|" + netID + "|" + accesskey.Value + "|" + privAddr -======= - tokenjson, err := json.Marshal(accessToken) - if err != nil { - return accesskey.AccessString, err - } ->>>>>>> 35826caa6fb2dfe3dbe65d25799d243f5a444999 - accesskey.AccessString = base64.StdEncoding.EncodeToString([]byte(tokenjson)) + accesskey.AccessString = base64.StdEncoding.EncodeToString([]byte(tokenjson)) network.AccessKeys = append(network.AccessKeys, accesskey)