diff --git a/.gitignore b/.gitignore index 22d3516..cb3399d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ Cargo.lock # Added by cargo /target +.vscode/ diff --git a/create.sh b/create.sh index a3c31ce..db34ab8 100755 --- a/create.sh +++ b/create.sh @@ -1,12 +1,10 @@ curl --header "Content-Type: application/json" \ - --data '{"command": { - "Create": { - "incoming_port": 5555, - "destination_port": 8080, - "destination_ip": "127.0.0.1", - "id": "67e55044-10b1-426f-9247-bb680e5fe0c8" - } - }, - "signature": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - }' \ + --data '{ + "create": { + "incoming_port": 5555, + "destination_port": 8080, + "destination_ip": "127.0.0.1", + "id": "67e55044-10b1-426f-9247-bb680e5fe0c8" + } + }' \ http://localhost:3000/command diff --git a/delete.sh b/delete.sh index c7907e4..8f320e3 100755 --- a/delete.sh +++ b/delete.sh @@ -1,9 +1,7 @@ curl --header "Content-Type: application/json" \ - --data '{"command": { - "Delete": { - "id": "67e55044-10b1-426f-9247-bb680e5fe0c8" - } - }, - "signature": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - }' \ + --data '{ + "delete": { + "id": "67e55044-10b1-426f-9247-bb680e5fe0c8" + } + }' \ http://localhost:3000/command diff --git a/modify.sh b/modify.sh index 6968315..cc138fb 100755 --- a/modify.sh +++ b/modify.sh @@ -1,11 +1,9 @@ curl --header "Content-Type: application/json" \ - --data '{"command": { - "Modify": { - "destination_port": 8888, - "destination_ip": "127.0.0.1", - "id": "67e55044-10b1-426f-9247-bb680e5fe0c8" - } - }, - "signature": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] - }' \ + --data '{ + "modify": { + "destination_port": 8888, + "destination_ip": "127.0.0.1", + "id": "67e55044-10b1-426f-9247-bb680e5fe0c8" + } + }' \ http://localhost:3000/command