fix: removed unneeded package that was also causing build issues
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
import disk from "diskusage";
|
||||
import env from "../enviroment/env";
|
||||
import { Request, Response } from "express";
|
||||
import { UserInterface } from "../models/user-model";
|
||||
|
||||
type userAccessType = {
|
||||
_id: string;
|
||||
emailVerified: boolean;
|
||||
email: string;
|
||||
s3Enabled: boolean;
|
||||
};
|
||||
|
||||
interface RequestType extends Request {
|
||||
user?: userAccessType;
|
||||
encryptedToken?: string;
|
||||
}
|
||||
|
||||
class StorageController {
|
||||
constructor() {}
|
||||
|
||||
getStorageInfo = async (req: RequestType, res: Response) => {
|
||||
if (!req.user) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (!env.root || env.root.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const info = await disk.check(env.root!);
|
||||
|
||||
res.send(info);
|
||||
} catch (e) {
|
||||
if (e instanceof Error) {
|
||||
console.log("\nGet Storage Error Storage Route:", e.message);
|
||||
}
|
||||
res.status(500).send("Server error getting storage info");
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default StorageController;
|
||||
@@ -39,7 +39,6 @@
|
||||
"core-js": "^3.6.4",
|
||||
"cors": "^2.8.5",
|
||||
"dayjs": "^1.11.13",
|
||||
"diskusage": "^1.1.3",
|
||||
"dotenv": "^8.2.0",
|
||||
"express": "^4.19.2",
|
||||
"express-validator": "^7.1.0",
|
||||
|
||||
Reference in New Issue
Block a user