Skip to content

Commit 66a6ffa

Browse files
committed
fix: cancel endpoint
1 parent c3390fc commit 66a6ffa

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/routes/copilotOpportunity/delete.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,21 @@ module.exports = [
4545
transaction,
4646
});
4747

48-
applications.update({
49-
status: COPILOT_APPLICATION_STATUS.CANCELED,
50-
}, {
51-
transaction,
48+
applications.forEach(async (application) => {
49+
await application.update({
50+
status: COPILOT_APPLICATION_STATUS.CANCELED,
51+
}, {
52+
transaction,
53+
});
5254
});
5355

54-
copilotRequest.update({
56+
await copilotRequest.update({
5557
status: COPILOT_REQUEST_STATUS.CANCELED,
5658
}, {
5759
transaction,
5860
});
5961

60-
opportunity.update({
62+
await opportunity.update({
6163
status: COPILOT_OPPORTUNITY_STATUS.CANCELED,
6264
}, {
6365
transaction,

0 commit comments

Comments
 (0)