Compare commits
2 commits
351a0e33fb
...
6df27ff3b0
| Author | SHA1 | Date | |
|---|---|---|---|
| 6df27ff3b0 | |||
| 3e9aa7eeb4 |
4 changed files with 6 additions and 3 deletions
|
|
@ -106,6 +106,7 @@ class TipagemRotas {
|
||||||
try {
|
try {
|
||||||
queryObj[chave] = JSON.parse(queryObj[chave]);
|
queryObj[chave] = JSON.parse(queryObj[chave]);
|
||||||
} catch {
|
} catch {
|
||||||
|
console.log(`[${queryObj[chave]}] n\xE3o \xE9 um json v\xE1lido.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return queryObj;
|
return queryObj;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "p-comuns",
|
"name": "p-comuns",
|
||||||
"version": "0.235.0",
|
"version": "0.236.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./dist-back/index.js",
|
"main": "./dist-back/index.js",
|
||||||
"module": "./dist-front/index.mjs",
|
"module": "./dist-front/index.mjs",
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,9 @@ export class TipagemRotas<T extends { [q: string]: any }> {
|
||||||
for (const chave in queryObj) {
|
for (const chave in queryObj) {
|
||||||
try {
|
try {
|
||||||
queryObj[chave] = JSON.parse(queryObj[chave])
|
queryObj[chave] = JSON.parse(queryObj[chave])
|
||||||
} catch {}
|
} catch {
|
||||||
|
console.log(`[${queryObj[chave]}] não é um json válido.`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return queryObj as Partial<T>
|
return queryObj as Partial<T>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue