remove uuid, only use nanoid and u64

This commit is contained in:
Wingy 2020-11-01 22:24:40 -05:00
parent 7bc40ac3af
commit f076f60844
4 changed files with 1353 additions and 1734 deletions

View file

@ -1,4 +1,4 @@
const { v4: uuid} = require('uuid');
const { nanoid } = require('nanoid')
const path = require('path');
const fs = require('fs');
@ -7,7 +7,7 @@ const secretFilePath = path.join((process.env.SECRET_DIRNAME ? process.env.SECRE
try {
module.exports = fs.readFileSync(secretFilePath).toString();
} catch (_) {
const secret = uuid();
const secret = nanoid(128);
fs.writeFileSync(secretFilePath, secret);
module.exports = secret;
}