summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-09-12 16:01:53 +0200
committerYorhel <git@yorhel.nl>2020-09-12 16:01:54 +0200
commit6689a7cfeaefa41d8a9435403b6f4a59c9b8f0ef (patch)
tree082d5a7b11a3485a04bfe6521f944cbea64c6e84
parente41c051427c4698f8bf28561ba5d6de7951cd1c2 (diff)
Reviews::Edit: Adjust throttle timeout
So that you don't have to wait a full 24 hours to post a new review. In practice, and with people who have a regular sleep interval, 18 hours between reviews also counts as "once per day".
-rw-r--r--lib/VNWeb/Reviews/Edit.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/Reviews/Edit.pm b/lib/VNWeb/Reviews/Edit.pm
index 0f764441..44a81c8f 100644
--- a/lib/VNWeb/Reviews/Edit.pm
+++ b/lib/VNWeb/Reviews/Edit.pm
@@ -20,7 +20,7 @@ my $FORM_IN = form_compile in => $FORM;
my $FORM_OUT = form_compile out => $FORM;
-sub throttled { tuwf->dbVali('SELECT COUNT(*) FROM reviews WHERE uid =', \auth->uid, 'AND date > NOW()-interval \'1 day\'') > 0 }
+sub throttled { tuwf->dbVali('SELECT COUNT(*) FROM reviews WHERE uid =', \auth->uid, 'AND date > NOW()-', \'18 hours', '::interval') > 0 }
TUWF::get qr{/$RE{vid}/addreview}, sub {