I have an API the uses sequelize to edit a record:
router.put("/editTenant/:id", async(req,res) =>{
const id = req.params.id
const tenant = await Tenants.findByPk(id);
Tenants.update({
tenantName: req.body.tenantName,
industry: req.body.industry
}, {
where: {
id: id
}
}
);
})
When I use Insomnia to test it, the request keeps running but if I go to the database, I see that the update worked. Why does the request keep even after success?