From 1ddbbd3563af77a218020021ea50a8832900b4db Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Tue, 22 Aug 2017 17:08:55 +0200 Subject: Add route logic for construction routes --- src/api/routes/util.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/api/routes/util.js (limited to 'src/api/routes/util.js') diff --git a/src/api/routes/util.js b/src/api/routes/util.js new file mode 100644 index 00000000..ff21d4f4 --- /dev/null +++ b/src/api/routes/util.js @@ -0,0 +1,37 @@ +import {sendRequest} from "../index"; + +export function getAll(path) { + return sendRequest({ + path, + method: "GET", + parameters: { + body: {}, + path: {}, + query: {} + } + }); +} + +export function getById(path, pathObject) { + return sendRequest({ + path, + method: "GET", + parameters: { + body: {}, + path: pathObject, + query: {} + } + }); +} + +export function deleteById(path, pathObject) { + return sendRequest({ + path, + method: "DELETE", + parameters: { + body: {}, + path: pathObject, + query: {} + } + }); +} -- cgit v1.2.3