Actualizar server.js
This commit is contained in:
@@ -2149,7 +2149,7 @@ app.put('/providers/scraped/:id', authMiddleware, async (req, res) => {
|
|||||||
const isUrgentFinal = is_urgent !== undefined ? is_urgent : current.rows[0].is_urgent;
|
const isUrgentFinal = is_urgent !== undefined ? is_urgent : current.rows[0].is_urgent;
|
||||||
|
|
||||||
await pool.query(
|
await pool.query(
|
||||||
`UPDATE scraped_services SET raw_data = $1, assigned_to = $2, is_urgent = $3 WHERE id = $4 AND owner_id = $5`,
|
`UPDATE scraped_services SET raw_data = $1, assigned_to = $2, is_urgent = $3, status = 'imported' WHERE id = $4 AND owner_id = $5`,
|
||||||
[JSON.stringify(updatedRawData), finalAssignedTo, isUrgentFinal, id, req.user.accountId]
|
[JSON.stringify(updatedRawData), finalAssignedTo, isUrgentFinal, id, req.user.accountId]
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -2304,7 +2304,7 @@ app.put("/services/set-appointment/:id", authMiddleware, async (req, res) => {
|
|||||||
"status_operativo": status_operativo
|
"status_operativo": status_operativo
|
||||||
};
|
};
|
||||||
|
|
||||||
await pool.query('UPDATE scraped_services SET raw_data = $1, assigned_to = $2 WHERE id = $3 AND owner_id = $4',
|
await pool.query('UPDATE scraped_services SET raw_data = $1, assigned_to = $2, status = \'imported\' WHERE id = $3 AND owner_id = $4',
|
||||||
[JSON.stringify(updatedRawData), finalAssignedTo, id, req.user.accountId]
|
[JSON.stringify(updatedRawData), finalAssignedTo, id, req.user.accountId]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user