imageFilenames and imageFilename, backend integration tests, frontend tests, removed username references

This commit is contained in:
jackiettran
2025-11-26 23:13:23 -05:00
parent f2d3aac029
commit 11593606aa
52 changed files with 2815 additions and 150 deletions

View File

@@ -27,7 +27,7 @@ const upload = multer({
router.post(
"/:rentalId",
authenticateToken,
upload.array("photos"),
upload.array("imageFilenames"),
async (req, res) => {
try {
const { rentalId } = req.params;
@@ -35,13 +35,13 @@ router.post(
const userId = req.user.id;
// Get uploaded file paths
const photos = req.files ? req.files.map((file) => file.path) : [];
const imageFilenames = req.files ? req.files.map((file) => file.path) : [];
const conditionCheck = await ConditionCheckService.submitConditionCheck(
rentalId,
checkType,
userId,
photos,
imageFilenames,
notes
);
@@ -50,7 +50,7 @@ router.post(
rentalId,
checkType,
userId,
photoCount: photos.length,
photoCount: imageFilenames.length,
});
res.status(201).json({