diff --git a/client/src/components/audit-trail-values/audit-trail-values.component.jsx b/client/src/components/audit-trail-values/audit-trail-values.component.jsx index cd54d8077..5064fe19c 100644 --- a/client/src/components/audit-trail-values/audit-trail-values.component.jsx +++ b/client/src/components/audit-trail-values/audit-trail-values.component.jsx @@ -3,11 +3,27 @@ import { List } from "antd"; import Icon from "@ant-design/icons"; import { FaArrowRight } from "react-icons/fa"; export default function AuditTrailValuesComponent({ oldV, newV }) { + console.log("(!oldV & !newV)", !oldV && !newV); + console.log("(!oldV & newV)", !oldV && newV); + if (!oldV && !newV) return
; + + if (!oldV && newV) + return ( + + {Object.keys(newV).map((key, idx) => ( + + {key}: {JSON.stringify(newV[key])} + + ))} + + ); + return ( {Object.keys(oldV).map((key, idx) => ( - - {key}: {oldV[key]} {newV[key]} + + {key}: {oldV[key]} + {JSON.stringify(newV[key])} ))} diff --git a/s3upload.js b/s3upload.js index 1091873b2..00e9efd5d 100644 --- a/s3upload.js +++ b/s3upload.js @@ -13,13 +13,6 @@ const S3_BUCKET = process.env.Bucket; exports.sign_s3 = (req, res) => { console.log("Get S3 Signed Put for bucket: " + S3_BUCKET); const s3 = new aws.S3(); // Create a new instance of S3 - // if (!req.body.fileName || req.body.fileType) { - // console.log('req.body.fileName', req.body.fileName) - // console.log('req.body.fileType', req.body.fileType) - // res.json({ success: false, error: "fileName or fileType missing." }); - // console.log("Error: fileName or fileType missing. "); - // return; - // } const fileName = req.body.fileName; const fileType = req.body.fileType; // Set up the payload of what we are sending to the S3 api