From 8eda24419aae74abf7507bf604786dab7581ba91 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Wed, 28 Dec 2022 03:37:09 +0100 Subject: [PATCH] Added the put request method to the RequestUtil.js --- admin/src/common/utils/RequestUtil.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/src/common/utils/RequestUtil.js b/admin/src/common/utils/RequestUtil.js index d68fbde..3b701ff 100644 --- a/admin/src/common/utils/RequestUtil.js +++ b/admin/src/common/utils/RequestUtil.js @@ -21,6 +21,11 @@ export const jsonRequest = async (path, headers = {}) => { return (await request(path, "GET", null, headers)).json(); } +// Run a PUT request and post some values +export const putRequest = async (path, body, headers = {}) => { + return await request(path, "PUT", body, headers); +} + // Run a POST request and post some values export const postRequest = async (path, body, headers = {}) => { return await request(path, "POST", body, headers);