refactor: replace uuid with nanoid for BRS actions

merge-requests/25/head
Hiroyuki 2021-04-03 04:38:20 -04:00
parent 0294cf506b
commit d93e9185da
No known key found for this signature in database
GPG Key ID: C15AC26538975A24
4 changed files with 11 additions and 4894 deletions

4889
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -51,6 +51,7 @@
"mathjs": "^7.6.0",
"moment": "^2.25.3",
"mongoose": "^5.11.15",
"nanoid": "^3.1.22",
"nodemailer": "^6.4.8",
"pluris": "^0.2.5",
"puppeteer": "^5.5.0",

View File

@ -1,5 +1,5 @@
import { Guild, GuildTextableChannel, Member, TextChannel } from 'eris';
import { v4 as genUUID } from 'uuid';
import { nanoid } from 'nanoid';
import { Request } from 'express';
import { RichEmbed, Route, Server } from '../../../class';
import { StaffInterface } from '../../../models';
@ -277,7 +277,7 @@ export default class Root extends Route {
});
}
const id = genUUID();
const id = nanoid();
const embed = this.genEmbed(
id,
'eo',
@ -323,7 +323,7 @@ export default class Root extends Route {
});
}
const id = genUUID();
const id = nanoid();
const embed = this.genEmbed(
id,
'motion',
@ -370,7 +370,7 @@ export default class Root extends Route {
});
}
const id = genUUID();
const id = nanoid();
const embed = this.genEmbed(
id,
'proc',
@ -1023,7 +1023,7 @@ export default class Root extends Route {
const totalDirectors = yea + nay + present + absent;
if (yea / totalDirectors >= 0.6) {
const resolutionID = genUUID();
const resolutionID = nanoid();
const resolutionEmbed = this.genEmbed(
resolutionID,

View File

@ -2664,6 +2664,11 @@ nan@^2.14.1:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
integrity sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==
nanoid@^3.1.22:
version "3.1.22"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.22.tgz#b35f8fb7d151990a8aebd5aa5015c03cf726f844"
integrity sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==
napi-build-utils@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"