This commit is contained in:
Matthew R. Kasun
2022-04-13 17:33:40 -04:00
parent 867a616227
commit 92d3e40bde
2 changed files with 7 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import (
"crypto/x509"
"encoding/json"
"errors"
"log"
"net/http"
"github.com/gravitl/netmaker/logger"
@@ -19,7 +20,8 @@ func Register(cfg *config.ClientConfig) error {
if cfg.Server.AccessKey == "" {
return errors.New("no access key provided")
}
url := "https://" + cfg.Server.Server + "/api/register"
url := cfg.Server.API + "/api/server/register"
log.Println("regsiter at ", url)
request, err := http.NewRequest(http.MethodPost, url, nil)
if err != nil {
return err