remove uuid, only use nanoid and u64
This commit is contained in:
parent
7bc40ac3af
commit
f076f60844
4 changed files with 1353 additions and 1734 deletions
|
@ -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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue