diff --git a/controllers/server.go b/controllers/server.go index b21b92c0..869e65c4 100644 --- a/controllers/server.go +++ b/controllers/server.go @@ -50,36 +50,6 @@ func allowUsers(next http.Handler) http.HandlerFunc { } } -// swagger:route DELETE /api/server/removenetwork/{network} server removeNetwork -// -// Remove a network from the server. -// -// Schemes: https -// -// Security: -// oauth -// -// Responses: -// 200: stringJSONResponse -func removeNetwork(w http.ResponseWriter, r *http.Request) { - // Set header - w.Header().Set("Content-Type", "application/json") - - // get params - var params = mux.Vars(r) - network := params["network"] - err := logic.DeleteNetwork(network) - if err != nil { - logger.Log(0, r.Header.Get("user"), - fmt.Sprintf("failed to delete network [%s]: %v", network, err)) - json.NewEncoder(w).Encode(fmt.Sprintf("could not remove network %s from server", network)) - return - } - logger.Log(1, r.Header.Get("user"), - fmt.Sprintf("deleted network [%s]: %v", network, err)) - json.NewEncoder(w).Encode(fmt.Sprintf("network %s removed from server", network)) -} - // swagger:route GET /api/server/getserverinfo server getServerInfo // // Get the server configuration. diff --git a/swagger.yaml b/swagger.yaml index af4419da..5532c70e 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -1661,17 +1661,6 @@ paths: summary: Registers a client with the server and return the Certificate Authority and certificate. tags: - server - /api/server/removenetwork/{network}: - delete: - operationId: removeNetwork - responses: - "200": - $ref: '#/responses/stringJSONResponse' - schemes: - - https - summary: Remove a network from the server. - tags: - - server /api/users: get: operationId: getUsers