view all delete button for awaiting submission

This commit is contained in:
2024-05-30 06:30:59 +01:00
parent 9b8936198a
commit 2c41f2476b
8 changed files with 211 additions and 26 deletions
@@ -17,11 +17,11 @@ ApiProxy.get(async (req, res) => {
var checkquerypath =
"/api/file/getawaitingsubmissionfromblob?container=" + containerName;
// console.log(
// "///////////////////////\ngetawaitingsubmissionblob url :",
// req.url,
// "\n///////////////////////\n"
// );
console.log(
"///////////////////////\ngetawaitingsubmissionblob url :",
req.url,
"\n///////////////////////\n"
);
// console.log(hashAPIPath(checkquerypath), checkHash);
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
@@ -0,0 +1,45 @@
import {
downloadAllProgressFiles,
getAllProgressBlobs,
} from "../../../actions/azurestorage";
import _ from "lodash";
import nextConnect from "next-connect";
import middleware from "../middleware/middleware";
import {
getToken,
azureHeaders,
consoleLogger,
hashAPIPath,
} from "../../../actions";
import axios from "axios";
import CryptoJS from "crypto-js";
const WORDKEY = process.env.HASHKEY;
const WEBAPI_URL =
process.env.RELAY_ROOT ||
"https://dev-pedw-ns.servicebus.windows.net/dev-pedw-hc/";
const BASE_URL = process.env.API_ROOT || `http://localhost:${port}`;
export default async function ApiProxy(req, res) {
var containerName = req.query.container;
var checkHash = req.query.hash;
var token = await getToken();
var queryUrl =
"/api/file/getawaitingsubmissionfromblob?container=" + containerName;
return axios
.get(
BASE_URL + queryUrl + hashAPIPath(queryUrl),
azureHeaders(token.access_token)
)
.then(({ data }) => {
res.status(200).json(data);
})
.catch((err) => {
consoleLogger(err);
res.status(400).json(err);
});
}