Function
updateWinnerStatusByUser
(lotteryId: number, userId: string, status: PrizeStatus, claimedAt?: number)
Source from the content-addressed store, hash-verified
| 486 | `); |
| 487 | const result = stmt.run(status, claimedAt || Date.now(), lotteryId, userId); |
| 488 | return result.changes > 0; |
| 489 | } |
| 490 | |
| 491 | function getWinnerStatusIcon(status: string): string { |
| 492 | switch (status) { |
| 493 | case PrizeStatus.SENT: |
| 494 | return "✅"; |
| 495 | case PrizeStatus.PENDING: |
| 496 | return "⏳"; |
| 497 | case PrizeStatus.EXPIRED: |
| 498 | return "❌"; |
| 499 | default: |
| 500 | return "❓"; |
| 501 | } |
Tested by
no test coverage detected