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

Commit e565156

Browse files
add logging
1 parent a4db832 commit e565156

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/copilotPaymentService.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async function setCopilotPayment (challengeLegacyId, amount, createdBy, updatedB
6767
const paymentType = await getCopilotPaymentType(connection, copilotResourceId)
6868
if (!paymentType) {
6969
await createCopilotPaymentType(connection, copilotResourceId, 'TRUE', updatedBy || createdBy)
70-
} else if (_.toLower(_.toString(paymentType.value)) === 'false') {
70+
} else if (_.toLower(_.toString(paymentType.value)) !== 'true') {
7171
await updateCopilotPaymentType(connection, copilotResourceId, 'TRUE', updatedBy || createdBy)
7272
}
7373
if (copilotPayment) {
@@ -97,6 +97,7 @@ async function setCopilotPayment (challengeLegacyId, amount, createdBy, updatedB
9797
*/
9898
async function getCopilotPaymentType (connection, resourceId) {
9999
const result = await connection.queryAsync(util.format(QUERY_SELECT_PAYMENT_TYPE, resourceId))
100+
logger.debug(`Result: ${JSON.stringify(result, null, 2)}`)
100101
return _.get(result, '[0]', null)
101102
}
102103

0 commit comments

Comments
 (0)