Skip to content

Commit 63d25bd

Browse files
authored
Merge pull request #134 from topcoder-platform/PM-3259_feedback
Return "points" in wallet response
2 parents 88ba3df + eca984b commit 63d25bd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/api/wallet/wallet.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ export class WalletService {
135135
w.type AS payment_type,
136136
CASE
137137
WHEN w.type = 'PAYMENT' THEN SUM(p.total_amount)
138+
WHEN w.type = 'POINTS' THEN SUM(p.total_amount)
138139
ELSE 0
139140
END AS total_owed
140141
FROM
141142
winnings w
142143
LEFT JOIN payment p ON w.winning_id = p.winnings_id
143-
AND w.type = 'PAYMENT'
144-
AND p.payment_status IN ('OWED', 'ON_HOLD')
144+
AND p.payment_status IN ('OWED', 'ON_HOLD', 'CREDITED')
145145
AND p.installment_number = 1
146146
INNER JOIN latest_payment_version lpv ON p.winnings_id = lpv.winnings_id
147147
AND p.version = lpv.max_version

src/dto/payment.dto.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export enum PaymentStatus {
1111
CANCELLED = 'CANCELLED',
1212
FAILED = 'FAILED',
1313
RETURNED = 'RETURNED',
14+
CREDITED = 'CREDITED',
1415
}
1516

1617
export class PaymentDetailDto {

0 commit comments

Comments
 (0)