refactor phase 3a api-file chunk 2 targeted actions imports

This commit is contained in:
2026-03-12 11:41:40 +00:00
parent 5822930f0a
commit 61913f9f80
11 changed files with 33 additions and 31 deletions
@@ -1,4 +1,4 @@
import { hashAPIPath } from "../../../actions";
import { hashAPIPath } from "../../../actions/core/hash";
import { deleteBlob } from "../../../actions/azurestorage";
import nextConnect from "next-connect";
@@ -38,8 +38,8 @@ ApiProxy.get(async (req, res) => {
export const config = {
api: {
bodyParser: false,
},
bodyParser: false
}
};
export default ApiProxy;
+3 -3
View File
@@ -1,4 +1,4 @@
import { hashAPIPath } from "../../../actions";
import { hashAPIPath } from "../../../actions/core/hash";
import { deleteBlob } from "../../../actions/azurestorage";
import nextConnect from "next-connect";
@@ -35,8 +35,8 @@ ApiProxy.get(async (req, res) => {
export const config = {
api: {
bodyParser: false,
},
bodyParser: false
}
};
export default ApiProxy;
+3 -3
View File
@@ -1,4 +1,4 @@
import { hashAPIPath } from "../../../actions";
import { hashAPIPath } from "../../../actions/core/hash";
import { deleteBlobCase } from "../../../actions/azurestorage";
import nextConnect from "next-connect";
@@ -33,8 +33,8 @@ ApiProxy.get(async (req, res) => {
export const config = {
api: {
bodyParser: false,
},
bodyParser: false
}
};
export default ApiProxy;
+3 -3
View File
@@ -1,4 +1,4 @@
import { hashAPIPath } from "../../../actions";
import { hashAPIPath } from "../../../actions/core/hash";
import { deleteBlobCase, deleteBlobRep } from "../../../actions/azurestorage";
import nextConnect from "next-connect";
@@ -38,8 +38,8 @@ ApiProxy.get(async (req, res) => {
export const config = {
api: {
bodyParser: false,
},
bodyParser: false
}
};
export default ApiProxy;
+3 -3
View File
@@ -1,7 +1,7 @@
import { downloadFile } from "../../../actions/azurestorage";
import nextConnect from "next-connect";
import { hashAPIPath } from "../../../actions";
import { hashAPIPath } from "../../../actions/core/hash";
import middleware from "../middleware/middleware";
const WORDKEY = process.env.HASHKEY;
@@ -58,8 +58,8 @@ async function streamToBuffer(readableStream) {
export const config = {
api: {
bodyParser: false,
},
bodyParser: false
}
};
export default ApiProxy;
@@ -5,7 +5,7 @@ import {
import _ from "lodash";
import nextConnect from "next-connect";
import middleware from "../middleware/middleware";
import { hashAPIPath } from "../../../actions";
import { hashAPIPath } from "../../../actions/core/hash";
const ApiProxy = nextConnect();
ApiProxy.use(middleware);
+3 -3
View File
@@ -29,7 +29,7 @@
* description: Success
*/
import { hashAPIPath } from "../../../actions";
import { hashAPIPath } from "../../../actions/core/hash";
import { getBlobs, getRepsFilesBlobs } from "../../../actions/azurestorage";
import nextConnect from "next-connect";
@@ -75,8 +75,8 @@ ApiProxy.get(async (req, res) => {
export const config = {
api: {
bodyParser: false,
},
bodyParser: false
}
};
export default ApiProxy;
+4 -4
View File
@@ -1,11 +1,11 @@
import {
downloadProgressFile,
getProgressBlobs,
getProgressBlobs
} from "../../../actions/azurestorage";
import _ from "lodash";
import nextConnect from "next-connect";
import middleware from "../middleware/middleware";
import { hashAPIPath } from "../../../actions";
import { hashAPIPath } from "../../../actions/core/hash";
const ApiProxy = nextConnect();
ApiProxy.use(middleware);
@@ -48,8 +48,8 @@ ApiProxy.get(async (req, res) => {
export const config = {
api: {
bodyParser: false,
},
bodyParser: false
}
};
export default ApiProxy;
+3 -2
View File
@@ -31,12 +31,13 @@
import {
downloadAllRepsFiles,
getRepsBlobs,
getRepsBlobs
} from "../../../actions/azurestorage";
import _ from "lodash";
import nextConnect from "next-connect";
import middleware from "../middleware/middleware";
import { consoleLogger, hashAPIPath } from "../../../actions";
import { hashAPIPath } from "../../../actions/core/hash";
import { consoleLogger } from "../../../actions/core/logger";
const ApiProxy = nextConnect();
ApiProxy.use(middleware);
+6 -5
View File
@@ -3,9 +3,10 @@ import {
createContainerSas,
getContainers,
getBlobs,
uploadFile,
uploadFile
} from "../../../actions/azurestorage";
import { hashAPIPath, consoleLogger } from "../../../actions";
import { hashAPIPath } from "../../../actions/core/hash";
import { consoleLogger } from "../../../actions/core/logger";
import middleware from "../middleware/middleware";
import nextConnect from "next-connect";
@@ -34,7 +35,7 @@ ApiProxy.get(async (req, res) => {
consoleLogger({
name: "setupcontainer",
code: "bad hash",
query: JSON.stringify(req.query),
query: JSON.stringify(req.query)
});
return res.status(400).json();
}
@@ -42,8 +43,8 @@ ApiProxy.get(async (req, res) => {
export const config = {
api: {
bodyParser: false,
},
bodyParser: false
}
};
export default ApiProxy;
+1 -1
View File
@@ -6,7 +6,7 @@ import {
import nextConnect from "next-connect";
import middleware from "../middleware/middleware";
import { consoleLogger } from "../../../actions";
import { consoleLogger } from "../../../actions/core/logger";
import { fileTypeFromBuffer } from "file-type";
import fs from "fs";
import path from "path";