From 7c4829f3495ffccefbcfd3d1718424acde3d2fc3 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Mon, 17 Jul 2023 18:06:04 -0600 Subject: [PATCH] feat: bit of a cleanup --- backend/routers/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/routers/index.ts b/backend/routers/index.ts index e245e60..2ea265f 100644 --- a/backend/routers/index.ts +++ b/backend/routers/index.ts @@ -50,7 +50,7 @@ router.post('/', async (req, res) => { try { // Get the file size - const fileSize = (await fs.stat(bbFile.file)).size; + const size = (await fs.stat(bbFile.file)).size; // Get the hash const sha256 = crypto.createHash('sha256').update(await fs.readFile(bbFile.file)).digest('base64'); @@ -62,14 +62,14 @@ router.post('/', async (req, res) => { // Build ass metadata const assFile: AssFile = { fakeid: random({ length: UserConfig.config.idSize }), // todo: more generators + size, + sha256, fileKey, + timestamp, mimetype: bbFile.mimetype, filename: bbFile.filename, - timestamp, uploader: '0', // todo: users save: {}, - sha256: '0', // todo: hashing - size: fileSize }; // Set the save location