mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 08:47:35 +08:00
remove unnecessary code
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
@@ -241,12 +240,6 @@ func createExtClient(w http.ResponseWriter, r *http.Request) {
|
||||
if err == nil { // check if parent network default ACL is enabled (yes) or not (no)
|
||||
extclient.Enabled = parentNetwork.DefaultACL == "yes"
|
||||
}
|
||||
|
||||
err = json.NewDecoder(r.Body).Decode(&extclient)
|
||||
if err != nil && !errors.Is(err, io.EOF) {
|
||||
returnErrorResponse(w, r, formatError(err, "internal"))
|
||||
return
|
||||
}
|
||||
err = logic.CreateExtClient(&extclient)
|
||||
if err != nil {
|
||||
returnErrorResponse(w, r, formatError(err, "internal"))
|
||||
|
Reference in New Issue
Block a user