Replaced nanoid with uniqid

This commit is contained in:
2021-08-12 20:17:10 +02:00
parent 8ea9478a10
commit 68b9b43891
2 changed files with 5 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
const fastify = require('fastify')({ logger: true })
const { nanoid } = require('nanoid')
var uniqid = require('uniqid');
const knex = require('knex')({
client: 'sqlite3',
connection: {
@@ -70,7 +71,7 @@ fastify.post('/new', { newUrlSchema }, async (req, res) => {
target
}
}
shortcode = nanoid(12);
shortcode = uniqid();
}
else {
const exists = await knex.select('shortcode')