diff --git a/controllers/albumsController.js b/controllers/albumsController.js index 7335a2c..a07449a 100644 --- a/controllers/albumsController.js +++ b/controllers/albumsController.js @@ -64,7 +64,9 @@ albumsController.create = async (req, res, next) => { enabled: 1, userid: user.id, identifier: randomstring.generate(8), - timestamp: Math.floor(Date.now() / 1000) + timestamp: Math.floor(Date.now() / 1000), + editedAt: 0, + zipGeneratedAt: 0 }) return res.json({ success: true }) diff --git a/database/db.js b/database/db.js index 5e9be2b..b8bc0fc 100644 --- a/database/db.js +++ b/database/db.js @@ -7,6 +7,8 @@ let init = function (db) { table.string('identifier') table.integer('enabled') table.integer('timestamp') + table.integer('editedAt').defaultTo(0) + table.integer('zipGeneratedAt').defaultTo(0) }).then(() => {}) db.schema.createTableIfNotExists('files', function (table) { diff --git a/routes/album.js b/routes/album.js index f3c068d..d2a45eb 100644 --- a/routes/album.js +++ b/routes/album.js @@ -34,7 +34,7 @@ routes.get('/a/:identifier', async (req, res, next) => { file.thumb = `` } else { - file.thumb = `

.${ext}

` + file.thumb = `

${ext}

` } }