Skip to content

Commit

Permalink
fixed spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiszli committed Jul 14, 2021
1 parent 5d9637d commit 7c1e5a6
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions functions/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 7c1e5a6

Please sign in to comment.