refactor(actions): extract shared relay client for direct services

This commit is contained in:
2026-03-25 06:14:23 +00:00
parent 5e51c2eb97
commit 6fa7cf9375
12 changed files with 112 additions and 88 deletions
+1 -20
View File
@@ -2,26 +2,7 @@ import axios from "axios";
import { BASE_URL } from "../core/env";
import { consoleLogger } from "../core/logger";
import { hashAPIPath } from "../core/hash";
const buildHashedQueryUrl = async (queryUrl) => {
try {
const signRes = await axios.get(
"/api/endpoint/gethash_api?path=" + encodeURIComponent(queryUrl)
);
if (!signRes?.data?.hash) {
throw new Error("Hash signature unavailable");
}
return queryUrl + signRes.data.hash;
} catch (error) {
if (typeof window === "undefined" && process.env.HASHKEY) {
return queryUrl + hashAPIPath(queryUrl);
}
throw error;
}
};
import { buildHashedQueryUrl } from "../clients/relayClient";
export const getAwaitingSubmissionFromBlob = (containerName) => {
return axios