mirror of
https://github.com/luscis/openlan.git
synced 2025-10-05 16:47:11 +08:00
fea:support add/del/save network (#55)
* fea:support add/del/save network
This commit is contained in:
@@ -46,7 +46,7 @@ func (h Output) Post(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
cs := h.Switcher.Config()
|
||||
if cs.Network == nil {
|
||||
if cs.Network[name] == nil {
|
||||
http.Error(w, "network is nil", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
@@ -69,7 +69,7 @@ func (h Output) Delete(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
cs := h.Switcher.Config()
|
||||
if cs.Network == nil {
|
||||
if cs.Network[name] == nil {
|
||||
http.Error(w, "network is nil", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user