mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-27 19:00:25 +08:00
ignore post cmd for qr code and if empty (#2825)
This commit is contained in:
@@ -256,14 +256,18 @@ func getExtClientConf(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
postUp := strings.Builder{}
|
||||
if client.PostUp != "" && params["type"] != "qr" {
|
||||
for _, loc := range strings.Split(client.PostUp, "\n") {
|
||||
postUp.WriteString(fmt.Sprintf("PostUp = %s\n", loc))
|
||||
}
|
||||
}
|
||||
|
||||
postDown := strings.Builder{}
|
||||
if client.PostDown != "" && params["type"] != "qr" {
|
||||
for _, loc := range strings.Split(client.PostDown, "\n") {
|
||||
postDown.WriteString(fmt.Sprintf("PostDown = %s\n", loc))
|
||||
}
|
||||
}
|
||||
|
||||
config := fmt.Sprintf(`[Interface]
|
||||
Address = %s
|
||||
|
||||
Reference in New Issue
Block a user