Updated db.js

This commit is contained in:
Bobby Wibowo 2019-08-27 00:46:56 +07:00
parent 7e3d177d00
commit 826286d13d
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF

View File

@ -1,5 +1,6 @@
const logger = require('./../logger')
const perms = require('./../controllers/permissionController')
const randomstring = require('randomstring')
const init = function (db) {
// Create the tables we need to store galleries and files
@ -55,7 +56,7 @@ const init = function (db) {
db.table('users').insert({
username: 'root',
password: hash,
token: require('randomstring').generate(64),
token: randomstring.generate(64),
timestamp: Math.floor(Date.now() / 1000),
permission: perms.permissions.superadmin
}).then(() => {})