Skip to content

Commit

Permalink
chore: debug throttle time
Browse files Browse the repository at this point in the history
  • Loading branch information
JayJay1024 committed Jul 15, 2022
1 parent bfe4959 commit 0915902
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion faucet/api/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export async function handler(req: VercelRequest, res: VercelResponse, config: C
const now = +new Date();
const lastClaimTime = +ipRecord;

if (now - lastClaimTime <= config.throttleHours * HOUR_TO_MILLISECONDS) {
// TODO: debug
void HOUR_TO_MILLISECONDS;
// eslint-disable-next-line
if (now - lastClaimTime <= 1000 * 60) {
// if (now - lastClaimTime <= config.throttleHours * HOUR_TO_MILLISECONDS) {
return responseEnd<ThrottleData>(res, 429, {
code: ResponseCode.FAILED_THROTTLE,
message: `You can get it every ${config.throttleHours} hours`,
Expand Down

0 comments on commit 0915902

Please sign in to comment.