TASK22269: delegate fileClient signed get/post to signedRequestClient
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
import { getJson, requestJson } from "./endpointClient";
|
||||
import { buildHashedQueryUrl } from "./relayClient";
|
||||
import { getSignedJson, postSignedJson } from "./signedRequestClient";
|
||||
|
||||
export const getFileJson = (url) => {
|
||||
return getJson(url);
|
||||
};
|
||||
|
||||
export const getSignedFileJson = async (queryUrl) => {
|
||||
const signedUrl = await buildHashedQueryUrl(queryUrl);
|
||||
|
||||
return requestJson({
|
||||
method: "get",
|
||||
url: signedUrl
|
||||
});
|
||||
return getSignedJson(queryUrl);
|
||||
};
|
||||
|
||||
export const downloadFileBlob = (url) => {
|
||||
@@ -23,12 +18,5 @@ export const downloadFileBlob = (url) => {
|
||||
};
|
||||
|
||||
export const postSignedFileJson = async (queryUrl, data, config = {}) => {
|
||||
const signedUrl = await buildHashedQueryUrl(queryUrl);
|
||||
|
||||
return requestJson({
|
||||
method: "post",
|
||||
url: signedUrl,
|
||||
data,
|
||||
...config
|
||||
});
|
||||
return postSignedJson(queryUrl, data, config);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user