Skip to content

Commit

Permalink
fixing extclient controller
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed May 20, 2021
1 parent 47f5dc9 commit c5c38f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion controllers/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func GetExtPeersList(networkName string, macaddress string) ([]models.ExtPeersRe
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)

//Get all nodes in the relevant network which are NOT in pending state
filter := bson.M{"network": networkName, "gatewayid": macaddress}
filter := bson.M{"network": networkName, "ingressgatewayid": macaddress}
cur, err := collection.Find(ctx, filter)

if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions controllers/extClientHttpController.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,19 +207,19 @@ func getExtClientConf(w http.ResponseWriter, r *http.Request) {
config := fmt.Sprintf(`[Interface]
Address = %s
PrivateKey = %s
%s
[Peer]
PublicKey = %s
AllowedIPs = %s
Endpoint = %s
%s
`, extclient.Address + "/32",
extclient.PrivateKey,
keepalive,
gwnode.PublicKey,
network.AddressRange,
gwendpoint)
gwendpoint,
keepalive)

if params["type"] == "qr" {
bytes, err := qrcode.Encode(config, qrcode.Medium, 220)
Expand Down

0 comments on commit c5c38f0

Please sign in to comment.