imageFilenames and imageFilename, backend integration tests, frontend tests, removed username references
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user