Skip to content

Commit

Permalink
style fix file handler
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Jan 6, 2023
1 parent a0749a4 commit 3313316
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions handlers/fileHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 3313316

Please sign in to comment.