mirror of
https://github.com/Wolvan/poll.horse.git
synced 2024-11-25 06:07:58 +01:00
Ignore casing in dupe check mode
This commit is contained in:
parent
584d0092d8
commit
d383d501f1
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ export default async function init(router: Router): Promise<void> {
|
|||
let id = randomString(8);
|
||||
while (await polls.getItem(id)) id = randomString(6);
|
||||
await polls.setItem(id, {});
|
||||
const dupeCheckMode = ["none", "ip", "cookie"].includes(req.body.dupeCheckMode) ? req.body.dupeCheckMode : "ip";
|
||||
const dupeCheckMode = ["none", "ip", "cookie"].includes((req.body.dupeCheckMode || "").toLowerCase()) ? (req.body.dupeCheckMode || "").toLowerCase() : "ip";
|
||||
const dupeData =
|
||||
dupeCheckMode === "none" ? null :
|
||||
dupeCheckMode === "ip" ? [] :
|
||||
|
|
Loading…
Reference in a new issue