mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 01:07:41 +08:00
fixed server node problems
This commit is contained in:
@@ -27,7 +27,6 @@ import (
|
||||
//node has that value for the same field within the network
|
||||
|
||||
func CreateServerToken(netID string) (string, error) {
|
||||
fmt.Println("Creating token.")
|
||||
var network models.Network
|
||||
var accesskey models.AccessKey
|
||||
|
||||
@@ -46,12 +45,10 @@ func CreateServerToken(netID string) (string, error) {
|
||||
privAddr = network.LocalRange
|
||||
}
|
||||
|
||||
accessstringdec := address + "|" + netID + "|" + accesskey.Value + "|" + privAddr
|
||||
accessstringdec := address + "|" + address + "|" + netID + "|" + accesskey.Value + "|" + privAddr
|
||||
|
||||
accesskey.AccessString = base64.StdEncoding.EncodeToString([]byte(accessstringdec))
|
||||
|
||||
fmt.Println(" access string: " + accesskey.AccessString)
|
||||
|
||||
network.AccessKeys = append(network.AccessKeys, accesskey)
|
||||
|
||||
collection := mongoconn.Client.Database("netmaker").Collection("networks")
|
||||
|
Reference in New Issue
Block a user