File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -691,17 +691,17 @@ export class AdminWinningService {
691
691
* @param toStatus to status
692
692
* @param tx transaction
693
693
*/
694
- async updateWinningsStatus ( userId , fromStatus , toStatus ) {
695
- await this . prisma . $executeRaw `
694
+ updateWinningsStatus ( userId , fromStatus , toStatus ) {
695
+ return this . prisma . $executeRaw `
696
696
UPDATE payment
697
- SET payment_status = ' ${ toStatus } ' ,
697
+ SET payment_status = ${ toStatus } ::payment_status ,
698
698
updated_at = now(),
699
699
updated_by = 'system',
700
700
version = version + 1
701
701
FROM winnings
702
702
WHERE payment.winnings_id = winnings.winning_id
703
- AND winnings.winner_id = ' ${ userId } '
704
- AND payment.payment_status = ' ${ fromStatus } ' AND version = version
703
+ AND winnings.winner_id = ${ userId }
704
+ AND payment.payment_status = ${ fromStatus } ::payment_status AND version = version
705
705
` ;
706
706
}
707
707
You can’t perform that action at this time.
0 commit comments