upodated rep file upload
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
import { hashAPIPath } from "../../../actions";
|
||||
import { getBlobs } from "../../../actions/azurestorage";
|
||||
import { getBlobs, getRepsFilesBlobs } from "../../../actions/azurestorage";
|
||||
|
||||
import nextConnect from "next-connect";
|
||||
import middleware from "../middleware/middleware";
|
||||
@@ -57,9 +57,17 @@ ApiProxy.get(async (req, res) => {
|
||||
// console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
|
||||
|
||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||
await getBlobs(containerName, casefolderID).then((data) => {
|
||||
return res.status(200).json({ "value": [data] });
|
||||
});
|
||||
casefolderID.split("/").length > 1
|
||||
? await getRepsFilesBlobs(
|
||||
containerName,
|
||||
casefolderID.split("/")[0],
|
||||
casefolderID.split("/")[1]
|
||||
).then((data) => {
|
||||
return res.status(200).json({ "value": [data] });
|
||||
})
|
||||
: await getBlobs(containerName, casefolderID).then((data) => {
|
||||
return res.status(200).json({ "value": [data] });
|
||||
});
|
||||
} else {
|
||||
return res.status(400).json();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user