From cb68a23b9080b051256f667921ddba30eeb85539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Mon, 8 Jun 2020 16:37:21 +0100 Subject: [PATCH] fix(ui): remove deprecated FetchPost --- ui/src/Common/Fetch.js | 5 +---- ui/src/Common/Fetch.test.js | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ui/src/Common/Fetch.js b/ui/src/Common/Fetch.js index 0d72aa876..615fbd7f4 100644 --- a/ui/src/Common/Fetch.js +++ b/ui/src/Common/Fetch.js @@ -37,7 +37,4 @@ const FetchGet = async (uri, options, beforeRetry) => FetchRetryConfig ); -const FetchPost = async (uri, options) => - await fetch(uri, merge({}, { method: "POST" }, CommonOptions, options)); - -export { CommonOptions, FetchGet, FetchPost, FetchRetryConfig }; +export { CommonOptions, FetchGet, FetchRetryConfig }; diff --git a/ui/src/Common/Fetch.test.js b/ui/src/Common/Fetch.test.js index 0cdfb9f89..b8ce88610 100644 --- a/ui/src/Common/Fetch.test.js +++ b/ui/src/Common/Fetch.test.js @@ -1,4 +1,4 @@ -import { CommonOptions, FetchGet, FetchPost, FetchRetryConfig } from "./Fetch"; +import { CommonOptions, FetchGet, FetchRetryConfig } from "./Fetch"; import merge from "lodash.merge"; @@ -20,12 +20,10 @@ afterEach(() => { describe("Fetch", () => { const tests = { FetchGet: FetchGet, - FetchPost: FetchPost, }; const methodOptions = { FetchGet: { method: "GET", mode: "cors" }, - FetchPost: { method: "POST" }, }; for (const [name, func] of Object.entries(tests)) {