From 4aec65d3f103e7a156a75f20e92c62b06ecb779a Mon Sep 17 00:00:00 2001 From: Nareshkumar Rao Date: Thu, 5 Aug 2021 18:12:39 +0200 Subject: [PATCH] quickfix default val --- src/db/models/User.ts | 1 + src/routes/CovidRoute.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/db/models/User.ts b/src/db/models/User.ts index c3ad9e6..36900b5 100644 --- a/src/db/models/User.ts +++ b/src/db/models/User.ts @@ -32,6 +32,7 @@ export const User = sequelize.define("User", { }, isInfected: { type: DataTypes.BOOLEAN, + defaultValue: false, }, infectionDate: { type: DataTypes.DATE, diff --git a/src/routes/CovidRoute.ts b/src/routes/CovidRoute.ts index 82c7026..e2470e0 100644 --- a/src/routes/CovidRoute.ts +++ b/src/routes/CovidRoute.ts @@ -19,7 +19,7 @@ export function CovidRoute(req: CovidRouteRequest, res:Response){ }); }else{ getUserCovidPositivity(req.session.userTelegramID, isInfected=>{ - res.status(isInfected ? 200 : 400).send({covidPositive: isInfected}); + res.send({covidPositive: isInfected}); }); } }