.
This commit is contained in:
parent
351a0e33fb
commit
3e9aa7eeb4
3 changed files with 8 additions and 1 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
|
|
@ -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