mirror of
https://github.com/luscis/openlan.git
synced 2025-10-05 08:36:59 +08:00
fea: list prefix route for system.
This commit is contained in:
@@ -138,7 +138,7 @@ func (h SNAT) Post(w http.ResponseWriter, r *http.Request) {
|
||||
name := vars["id"]
|
||||
|
||||
if obj := Call.GetWorker(name); obj != nil {
|
||||
obj.DoSnat()
|
||||
obj.EnableSnat()
|
||||
} else {
|
||||
http.Error(w, name+" not found", http.StatusBadRequest)
|
||||
return
|
||||
@@ -152,7 +152,7 @@ func (h SNAT) Delete(w http.ResponseWriter, r *http.Request) {
|
||||
name := vars["id"]
|
||||
|
||||
if obj := Call.GetWorker(name); obj != nil {
|
||||
obj.UndoSnat()
|
||||
obj.DisableSnat()
|
||||
} else {
|
||||
http.Error(w, name+" not found", http.StatusBadRequest)
|
||||
return
|
||||
|
Reference in New Issue
Block a user