Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit d2a311c

Browse files
fix transaction
1 parent 7ee6b4f commit d2a311c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/copilotPaymentService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ async function setCopilotPayment (challengeLegacyId, amount, createdBy, updatedB
7373
}
7474
if (copilotPayment) {
7575
logger.debug(`Copilot payment exists, updating: ${challengeLegacyId}`)
76-
return updateCopilotPayment(connection, copilotResourceId, challengeLegacyId, amount, updatedBy)
76+
await updateCopilotPayment(connection, copilotResourceId, challengeLegacyId, amount, updatedBy)
7777
} else {
7878
logger.debug(`NO Copilot payment exists, creating: ${challengeLegacyId}`)
7979
await createCopilotPayment(connection, challengeLegacyId, amount, createdBy)
8080
}
8181
} else {
8282
logger.debug(`No copilot assigned, removing any payments for legacy ID: ${challengeLegacyId}`)
83-
return deleteCopilotPayment(connection, challengeLegacyId)
83+
await deleteCopilotPayment(connection, challengeLegacyId)
8484
}
8585
await connection.commitTransactionAsync()
8686
} catch (e) {

0 commit comments

Comments
 (0)