diff options
| author | Bobby Wibowo <[email protected]> | 2018-04-26 13:50:35 +0700 |
|---|---|---|
| committer | Crawl <[email protected]> | 2018-04-26 08:50:35 +0200 |
| commit | 19e965a77a6e5040d2ca6ad3c9a565408c5910fe (patch) | |
| tree | 5bb57a41e4ce20354ddc11e873c1467164ad2562 /controllers/albumsController.js | |
| parent | no-useless-return (#94) (diff) | |
| download | host.fuwn.me-19e965a77a6e5040d2ca6ad3c9a565408c5910fe.tar.xz host.fuwn.me-19e965a77a6e5040d2ca6ad3c9a565408c5910fe.zip | |
SEMICOLONS, ermahgerd (#93)
Diffstat (limited to 'controllers/albumsController.js')
| -rw-r--r-- | controllers/albumsController.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/controllers/albumsController.js b/controllers/albumsController.js index ed57cac..a395f9b 100644 --- a/controllers/albumsController.js +++ b/controllers/albumsController.js @@ -23,8 +23,8 @@ albumsController.list = async (req, res, next) => { let ids = []; for (let album of albums) { - album.date = new Date(album.timestamp * 1000) - album.date = utils.getPrettyDate(album.date) + album.date = new Date(album.timestamp * 1000); + album.date = utils.getPrettyDate(album.date); album.identifier = `${config.domain}/a/${album.identifier}`; ids.push(album.id); @@ -55,7 +55,7 @@ albumsController.create = async (req, res, next) => { }).first(); if (album) { - return res.json({ success: false, description: 'There\'s already an album with that name' }) + return res.json({ success: false, description: 'There\'s already an album with that name' }); } await db.table('albums').insert({ @@ -96,10 +96,10 @@ albumsController.rename = async (req, res, next) => { const album = await db.table('albums').where({ name: name, userid: user.id }).first(); if (album) { - return res.json({ success: false, description: 'Name already in use' }) + return res.json({ success: false, description: 'Name already in use' }); } - await db.table('albums').where({ id: id, userid: user.id }).update({ name: name }) + await db.table('albums').where({ id: id, userid: user.id }).update({ name: name }); return res.json({ success: true }); }; |