enable public report
This commit is contained in:
parent
8f563d1058
commit
41c3093754
21 changed files with 307 additions and 19 deletions
|
@ -79,7 +79,10 @@ export async function getDamageReportById(req: Request, res: Response): Promise<
|
|||
*/
|
||||
export async function createDamageReport(req: Request, res: Response): Promise<any> {
|
||||
const description = req.body.description;
|
||||
const location = req.body.location;
|
||||
const note = req.body.note;
|
||||
const reportedBy = req.body.reportedBy;
|
||||
const images = req.files as Express.Multer.File[];
|
||||
const affectedId = req.body.affectedId;
|
||||
const affected = req.body.affected;
|
||||
|
||||
|
@ -88,8 +91,10 @@ export async function createDamageReport(req: Request, res: Response): Promise<a
|
|||
|
||||
let createDamageReport: CreateDamageReportCommand = {
|
||||
description,
|
||||
location,
|
||||
note,
|
||||
reportedBy,
|
||||
imageCount: 0,
|
||||
images: images.map((i) => i.filename),
|
||||
affectedId,
|
||||
affected,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue