From 3313316ff95b11dc2d2c60c292ae3ad44289ff9e Mon Sep 17 00:00:00 2001 From: Ryan Birmingham Date: Fri, 6 Jan 2023 16:07:45 -0500 Subject: [PATCH] style fix file handler --- handlers/fileHandlers.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handlers/fileHandlers.js b/handlers/fileHandlers.js index 8e000bc..c060de5 100644 --- a/handlers/fileHandlers.js +++ b/handlers/fileHandlers.js @@ -4,11 +4,10 @@ const uuid = require("uuid"); // write a file containing the request body function writeFile(path, prefix) { return function(req, res, next) { - const json = JSON.parse(req.body); json.create_date = new Date(); req.body = JSON.stringify(json); - if (json.batch){ + if (json.batch) { prefix = json.batch + "_" + prefix; } let fn = prefix + "_" + uuid.v4() + ".json";