TASK22269: delegate fileClient signed get/post to signedRequestClient

This commit is contained in:
2026-03-25 13:47:46 +00:00
parent 7470975d0e
commit 85cc7d165e
3 changed files with 49 additions and 41 deletions
+3 -15
View File
@@ -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);
};