From 25d00b571010f0a9ed1996d74171326918c2a566 Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Sun, 9 Mar 2025 12:35:03 +0000 Subject: [PATCH] chore: revert change in this branch --- web/assets/js/util/index.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/web/assets/js/util/index.js b/web/assets/js/util/index.js index 44af6630..2c8ac7dc 100644 --- a/web/assets/js/util/index.js +++ b/web/assets/js/util/index.js @@ -81,19 +81,12 @@ class PromiseUtil { } class RandomUtil { - static getSeq({ type = "default", hasNumbers = true, hasLowercase = true, hasUppercase = true } = {}) { + static getSeq({ hasNumbers = true, hasLowercase = true, hasUppercase = true } = {}) { let seq = ''; - switch (type) { - case "hex": - seq += "0123456789abcdef"; - break; - default: - if (hasNumbers) seq += "0123456789"; - if (hasLowercase) seq += "abcdefghijklmnopqrstuvwxyz"; - if (hasUppercase) seq += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - break; - } + if (hasNumbers) seq += "0123456789"; + if (hasLowercase) seq += "abcdefghijklmnopqrstuvwxyz"; + if (hasUppercase) seq += "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; return seq; } @@ -116,7 +109,7 @@ class RandomUtil { static randomShortIds() { const lengths = [2, 4, 6, 8, 10, 12, 14, 16].sort(() => Math.random() - 0.5); - return lengths.map(len => this.randomSeq(len, { type: "hex" })).join(','); + return lengths.map(len => this.randomSeq(len)).join(','); } static randomLowerAndNum(len) {