diff options
Diffstat (limited to 'src/api/structures')
| -rw-r--r-- | src/api/structures/Route.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/structures/Route.js b/src/api/structures/Route.js index cb2878b..c04c585 100644 --- a/src/api/structures/Route.js +++ b/src/api/structures/Route.js @@ -25,7 +25,8 @@ const db = require('knex')({ const processResponse = row => { Object.keys(row).forEach(key => { if (booleanFields.includes(key)) { - row[key] = row[key] === 1 ? true : false; + if (row[key] === 0) row[key] = false; + else if (row[key] === 1) row[key] = true; } }); return row; |