refactor phase 3a api-file chunk 2 targeted actions imports
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
import { deleteBlob } from "../../../actions/azurestorage";
|
import { deleteBlob } from "../../../actions/azurestorage";
|
||||||
|
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
@@ -38,8 +38,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
api: {
|
api: {
|
||||||
bodyParser: false,
|
bodyParser: false
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ApiProxy;
|
export default ApiProxy;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
import { deleteBlob } from "../../../actions/azurestorage";
|
import { deleteBlob } from "../../../actions/azurestorage";
|
||||||
|
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
@@ -35,8 +35,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
api: {
|
api: {
|
||||||
bodyParser: false,
|
bodyParser: false
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ApiProxy;
|
export default ApiProxy;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
import { deleteBlobCase } from "../../../actions/azurestorage";
|
import { deleteBlobCase } from "../../../actions/azurestorage";
|
||||||
|
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
@@ -33,8 +33,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
api: {
|
api: {
|
||||||
bodyParser: false,
|
bodyParser: false
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ApiProxy;
|
export default ApiProxy;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
import { deleteBlobCase, deleteBlobRep } from "../../../actions/azurestorage";
|
import { deleteBlobCase, deleteBlobRep } from "../../../actions/azurestorage";
|
||||||
|
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
@@ -38,8 +38,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
api: {
|
api: {
|
||||||
bodyParser: false,
|
bodyParser: false
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ApiProxy;
|
export default ApiProxy;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { downloadFile } from "../../../actions/azurestorage";
|
import { downloadFile } from "../../../actions/azurestorage";
|
||||||
|
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
import middleware from "../middleware/middleware";
|
import middleware from "../middleware/middleware";
|
||||||
|
|
||||||
const WORDKEY = process.env.HASHKEY;
|
const WORDKEY = process.env.HASHKEY;
|
||||||
@@ -58,8 +58,8 @@ async function streamToBuffer(readableStream) {
|
|||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
api: {
|
api: {
|
||||||
bodyParser: false,
|
bodyParser: false
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ApiProxy;
|
export default ApiProxy;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
import middleware from "../middleware/middleware";
|
import middleware from "../middleware/middleware";
|
||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const ApiProxy = nextConnect();
|
const ApiProxy = nextConnect();
|
||||||
ApiProxy.use(middleware);
|
ApiProxy.use(middleware);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
* description: Success
|
* description: Success
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
import { getBlobs, getRepsFilesBlobs } from "../../../actions/azurestorage";
|
import { getBlobs, getRepsFilesBlobs } from "../../../actions/azurestorage";
|
||||||
|
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
@@ -75,8 +75,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
api: {
|
api: {
|
||||||
bodyParser: false,
|
bodyParser: false
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ApiProxy;
|
export default ApiProxy;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
downloadProgressFile,
|
downloadProgressFile,
|
||||||
getProgressBlobs,
|
getProgressBlobs
|
||||||
} from "../../../actions/azurestorage";
|
} from "../../../actions/azurestorage";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
import middleware from "../middleware/middleware";
|
import middleware from "../middleware/middleware";
|
||||||
import { hashAPIPath } from "../../../actions";
|
import { hashAPIPath } from "../../../actions/core/hash";
|
||||||
|
|
||||||
const ApiProxy = nextConnect();
|
const ApiProxy = nextConnect();
|
||||||
ApiProxy.use(middleware);
|
ApiProxy.use(middleware);
|
||||||
@@ -48,8 +48,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
api: {
|
api: {
|
||||||
bodyParser: false,
|
bodyParser: false
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ApiProxy;
|
export default ApiProxy;
|
||||||
|
|||||||
@@ -31,12 +31,13 @@
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
downloadAllRepsFiles,
|
downloadAllRepsFiles,
|
||||||
getRepsBlobs,
|
getRepsBlobs
|
||||||
} from "../../../actions/azurestorage";
|
} from "../../../actions/azurestorage";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
import middleware from "../middleware/middleware";
|
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();
|
const ApiProxy = nextConnect();
|
||||||
ApiProxy.use(middleware);
|
ApiProxy.use(middleware);
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ import {
|
|||||||
createContainerSas,
|
createContainerSas,
|
||||||
getContainers,
|
getContainers,
|
||||||
getBlobs,
|
getBlobs,
|
||||||
uploadFile,
|
uploadFile
|
||||||
} from "../../../actions/azurestorage";
|
} 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 middleware from "../middleware/middleware";
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
@@ -34,7 +35,7 @@ ApiProxy.get(async (req, res) => {
|
|||||||
consoleLogger({
|
consoleLogger({
|
||||||
name: "setupcontainer",
|
name: "setupcontainer",
|
||||||
code: "bad hash",
|
code: "bad hash",
|
||||||
query: JSON.stringify(req.query),
|
query: JSON.stringify(req.query)
|
||||||
});
|
});
|
||||||
return res.status(400).json();
|
return res.status(400).json();
|
||||||
}
|
}
|
||||||
@@ -42,8 +43,8 @@ ApiProxy.get(async (req, res) => {
|
|||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
api: {
|
api: {
|
||||||
bodyParser: false,
|
bodyParser: false
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ApiProxy;
|
export default ApiProxy;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
|
|
||||||
import nextConnect from "next-connect";
|
import nextConnect from "next-connect";
|
||||||
import middleware from "../middleware/middleware";
|
import middleware from "../middleware/middleware";
|
||||||
import { consoleLogger } from "../../../actions";
|
import { consoleLogger } from "../../../actions/core/logger";
|
||||||
import { fileTypeFromBuffer } from "file-type";
|
import { fileTypeFromBuffer } from "file-type";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|||||||
Reference in New Issue
Block a user