(userId, giveawayId)
| 250 | } |
| 251 | |
| 252 | export function isUserRateLimited(userId, giveawayId) { |
| 253 | const status = getRateLimitStatus( |
| 254 | getGiveawayInteractionKey(userId, giveawayId), |
| 255 | GIVEAWAY_INTERACTION_COOLDOWN, |
| 256 | ); |
| 257 | return status.attempts >= 1 && status.remaining > 0; |
| 258 | } |
| 259 | |
| 260 | export async function recordUserInteraction(userId, giveawayId) { |
| 261 | await checkRateLimit( |
no test coverage detected