Remove rate limit check on compiler flag
This commit is contained in:
parent
5e033d0356
commit
91746924dc
1 changed files with 6 additions and 4 deletions
|
|
@ -434,8 +434,9 @@ proc executeReply(c: TForumData, threadId: int, content: string,
|
|||
else:
|
||||
raise newForumError("You are not allowed to post")
|
||||
|
||||
if rateLimitCheck(c):
|
||||
raise newForumError("You're posting too fast!")
|
||||
when not defined(skipRateLimitCheck):
|
||||
if rateLimitCheck(c):
|
||||
raise newForumError("You're posting too fast!")
|
||||
|
||||
if content.strip().len == 0:
|
||||
raise newForumError("Message cannot be empty")
|
||||
|
|
@ -567,8 +568,9 @@ proc executeNewThread(c: TForumData, subject, msg, categoryID: string): (int64,
|
|||
if not validateRst(c, msg):
|
||||
raise newForumError("Message needs to be valid RST", @["msg"])
|
||||
|
||||
if rateLimitCheck(c):
|
||||
raise newForumError("You're posting too fast!")
|
||||
when not defined(skipRateLimitCheck):
|
||||
if rateLimitCheck(c):
|
||||
raise newForumError("You're posting too fast!")
|
||||
|
||||
result[0] = tryInsertID(db, query, subject, categoryID).int
|
||||
if result[0] < 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue