mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-10 15:14:22 +08:00
Merge branch 'develop' of https://github.com/gravitl/netmaker into NET-1911
This commit is contained in:
commit
0e3e9162c7
2 changed files with 7 additions and 2 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/gorilla/mux"
|
||||
|
@ -181,7 +182,11 @@ func pull(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
if sendPeerUpdate {
|
||||
if err := mq.PublishPeerUpdate(true); err != nil {
|
||||
reset := true
|
||||
if os.Getenv("RESET_PEER_UPDATE") != "" {
|
||||
reset = os.Getenv("RESET_PEER_UPDATE") == "true"
|
||||
}
|
||||
if err := mq.PublishPeerUpdate(reset); err != nil {
|
||||
logger.Log(0, "fail to publish peer update: ", err.Error())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ func CheckIDSyntax(id string) error {
|
|||
if len(id) < 3 {
|
||||
return errors.New("name should have min 3 characters")
|
||||
}
|
||||
reg, err := regexp.Compile("^[a-zA-Z-]+$")
|
||||
reg, err := regexp.Compile("^[a-zA-Z0-9- ]+$")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue