update to use SAS key

This commit is contained in:
2024-09-11 11:48:25 +01:00
parent 8ce491846b
commit 3135eb345d
2 changed files with 12 additions and 2 deletions
+10 -1
View File
@@ -70,7 +70,11 @@ export const createContainerSas = async (containerName) => {
expiresOn: TEN_MINUTES_AFTER_NOW,
};
console.log(JSON.stringify(sasOptions));
console.log(
"\n////////////////////////\nsasOptions :",
JSON.stringify(sasOptions),
"\n////////////////////////"
);
const sasToken = generateBlobSASQueryParameters(
sasOptions,
@@ -78,6 +82,11 @@ export const createContainerSas = async (containerName) => {
accountName
).toString();
console.log(
"\n////////////////////////\nsasToken :",
sasToken,
"\n////////////////////////"
);
return sasToken;
};
+2 -1
View File
@@ -1,5 +1,6 @@
import {
createContainer,
createContainerSas,
getContainers,
getBlobs,
uploadFile,
@@ -21,7 +22,7 @@ ApiProxy.get(async (req, res) => {
//console.log(hashAPIPath(checkquerypath) == "&hash=" + checkHash);
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await createContainer(containerName)
await createContainerSas(containerName)
.then((data) => {
return res.status(200).json({ data: "success" });
})