pwi-plata-type 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/libs/model.ts
CHANGED
|
@@ -442,7 +442,7 @@ export function Telefone(): ModelValicacaoPrimitivo {
|
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
-
if (v[0].length !== 2 || v[1].length
|
|
445
|
+
if (v[0].length !== 2 || (v[1].length !== 8 && v[1].length !== 9)) {
|
|
446
446
|
return {
|
|
447
447
|
error: {
|
|
448
448
|
errorID: "BPVTEL002",
|
|
@@ -481,7 +481,7 @@ export function TelefoneDDI(): ModelValicacaoPrimitivo {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
if (telefone[0].length !== 2 || telefone[1].length
|
|
484
|
+
if (telefone[0].length !== 2 || (telefone[1].length !== 8 && telefone[1].length !== 9)) {
|
|
485
485
|
return {
|
|
486
486
|
error: {
|
|
487
487
|
errorID: "BPVTELD002",
|
package/libs/routes.ts
CHANGED
|
@@ -239,7 +239,7 @@ export async function loadExpressRoutes(): Promise<PlataRequiredRoute[]> {
|
|
|
239
239
|
export async function buildExpressRouter(): Promise<_Router> {
|
|
240
240
|
const router = Router() as _Router
|
|
241
241
|
router._routes = []
|
|
242
|
-
router.use(express.json())
|
|
242
|
+
router.use(express.json({ limit: process.env._PLATA_API_JSON_SIZE ?? '100kb' }))
|
|
243
243
|
|
|
244
244
|
const routes = await loadExpressRoutes()
|
|
245
245
|
|
package/package.json
CHANGED