Browse Source

quickfix default val

tsMigration
Nareshkumar Rao 3 years ago
committed by Nareshkumar Rao
parent
commit
4aec65d3f1
  1. 1
      src/db/models/User.ts
  2. 2
      src/routes/CovidRoute.ts

1
src/db/models/User.ts

@ -32,6 +32,7 @@ export const User = sequelize.define<UserInstance>("User", {
},
isInfected: {
type: DataTypes.BOOLEAN,
defaultValue: false,
},
infectionDate: {
type: DataTypes.DATE,

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

Loading…
Cancel
Save