hashing reps and submission blobs
This commit is contained in:
+7
-2
@@ -795,10 +795,11 @@ export const getAwaitingSubmissionFromBlob = (containerName) => {
|
||||
|
||||
export const getRepsFromBlob = (containerName) => {
|
||||
console.log(
|
||||
"///////////////////////getRepsFromBlob: " +
|
||||
"///////////////////////\ngetRepsFromBlob: " +
|
||||
containerName +
|
||||
"\n///////////////////////\n"
|
||||
);
|
||||
|
||||
return axios
|
||||
.get(
|
||||
BASE_URL +
|
||||
@@ -819,7 +820,11 @@ export const getAwaitingSubmissionFromBlobProxy = (containerName) => {
|
||||
.get(
|
||||
BASE_URL +
|
||||
"/api/file/getawaitingsubmissionfromblob?container=" +
|
||||
containerName
|
||||
containerName +
|
||||
+hashAPIPath(
|
||||
"/api/file/getawaitingsubmissionfromblob?container=" +
|
||||
containerName
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
return res.data;
|
||||
|
||||
@@ -23,19 +23,19 @@ ApiProxy.get(async (req, res) => {
|
||||
"\n///////////////////////\n"
|
||||
);
|
||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||
|
||||
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||
const blobObj = await getAllProgressBlobs(containerName)
|
||||
.then((data) => {
|
||||
return downloadAllProgressFiles(containerName, data);
|
||||
})
|
||||
.then((data) => {
|
||||
return res.status(200).json(data);
|
||||
});
|
||||
// } else {
|
||||
// return res.status(400).json();
|
||||
// }
|
||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||
const blobObj = await getAllProgressBlobs(containerName)
|
||||
.then((data) => {
|
||||
return downloadAllProgressFiles(containerName, data);
|
||||
})
|
||||
.then((data) => {
|
||||
return res.status(200).json(data);
|
||||
});
|
||||
} else {
|
||||
return res.status(400).json();
|
||||
}
|
||||
});
|
||||
|
||||
export const config = {
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
import _ from "lodash";
|
||||
import nextConnect from "next-connect";
|
||||
import middleware from "../middleware/middleware";
|
||||
import { hashAPIPath } from "../../../actions";
|
||||
|
||||
const ApiProxy = nextConnect();
|
||||
ApiProxy.use(middleware);
|
||||
@@ -14,30 +15,19 @@ ApiProxy.get(async (req, res) => {
|
||||
var casefolderID = req.query.casefolderID;
|
||||
|
||||
var checkHash = req.query.hash;
|
||||
var checkquerypath =
|
||||
"/api/file/getrepsblob?container=" +
|
||||
containerName +
|
||||
"&casefolderID=" +
|
||||
casefolderID;
|
||||
var checkquerypath = "/api/file/getrepsblob?container=" + containerName;
|
||||
|
||||
console.log(checkquerypath);
|
||||
// console.log(hashAPIPath(checkquerypath), checkHash);
|
||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||
|
||||
//if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||
const blobObj = await getRepslobs(containerName, casefolderID)
|
||||
.then((data) => {
|
||||
console.log("reps blob", data);
|
||||
|
||||
return downloadAllRepsFiles(containerName, data);
|
||||
})
|
||||
.then((data) => {
|
||||
return res.status(200).json(data);
|
||||
});
|
||||
|
||||
// } else {
|
||||
// return res.status(400).json();
|
||||
// }
|
||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||
const blobObj = await getRepslobs(containerName, casefolderID)
|
||||
.then((data) => {
|
||||
return downloadAllRepsFiles(containerName, data);
|
||||
})
|
||||
.then((data) => {
|
||||
return res.status(200).json(data);
|
||||
});
|
||||
} else {
|
||||
return res.status(400).json();
|
||||
}
|
||||
});
|
||||
|
||||
export const config = {
|
||||
|
||||
Reference in New Issue
Block a user