mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-17 22:48:49 +08:00
ignore post cmd for qr code and if empty (#2825)
This commit is contained in:
parent
217c676ee7
commit
2d8f67db11
1 changed files with 8 additions and 4 deletions
|
|
@ -256,13 +256,17 @@ func getExtClientConf(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
postUp := strings.Builder{}
|
||||
for _, loc := range strings.Split(client.PostUp, "\n") {
|
||||
postUp.WriteString(fmt.Sprintf("PostUp = %s\n", loc))
|
||||
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{}
|
||||
for _, loc := range strings.Split(client.PostDown, "\n") {
|
||||
postDown.WriteString(fmt.Sprintf("PostDown = %s\n", loc))
|
||||
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]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue