mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
fix(ui): remove deprecated FetchPost
This commit is contained in:
committed by
Łukasz Mierzwa
parent
be882121cd
commit
cb68a23b90
@@ -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 };
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user