Fixing description lenght
This commit is contained in:
parent
27aba84fc7
commit
987cf35f6f
@ -13,6 +13,7 @@ export default async function folderHandler(req: Request, response: Response, ne
|
||||
const deed = req.body.deed;
|
||||
const folderNumber = req.body.folder_number;
|
||||
const stakeHolders = req.body.stakeholders as any[];
|
||||
const description = req.body.description;
|
||||
|
||||
if (office && office.uid != officeId) {
|
||||
response.status(HttpCodes.UNAUTHORIZED).send("Unauthorized with this office");
|
||||
@ -31,6 +32,11 @@ export default async function folderHandler(req: Request, response: Response, ne
|
||||
}
|
||||
}
|
||||
|
||||
if (description && description.length > 250) {
|
||||
response.status(HttpCodes.VALIDATION_ERROR).send([{ property: "description", constraints: { description: "La description dépasse 250 caractères" } }]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (stakeHolders && stakeHolders.length === 0) {
|
||||
response
|
||||
.status(HttpCodes.VALIDATION_ERROR)
|
||||
|
@ -407,6 +407,8 @@ export default class IdNotService extends BaseService {
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log("officeLocationData", officeLocationData);
|
||||
|
||||
const office = await this.officeService.get({ where: { idNot: decodedToken.entity_idn } });
|
||||
|
||||
// if(officeLocationData.result[0]!.adrGeoCodePostal.slice(0,2) !== "35") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user