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}); }); } }