From f06c8c9d336cbee561d9a80abc78568c28463e52 Mon Sep 17 00:00:00 2001 From: Pitu Date: Thu, 14 Mar 2019 23:14:45 +0900 Subject: dunno what's wrong here yet --- src/api/routes/albums/link/linkDELETE.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/api') diff --git a/src/api/routes/albums/link/linkDELETE.js b/src/api/routes/albums/link/linkDELETE.js index d6d98c4..3ec4d9d 100644 --- a/src/api/routes/albums/link/linkDELETE.js +++ b/src/api/routes/albums/link/linkDELETE.js @@ -1,4 +1,5 @@ const Route = require('../../../structures/Route'); +const { dump } = require('dumper.js'); class linkDELETE extends Route { constructor() { @@ -6,6 +7,10 @@ class linkDELETE extends Route { } async run(req, res, db) { + console.log('------------------------------'); + console.log('YES HI'); + console.log('------------------------------'); + console.log('WHO NEEDS FANCY DEBUGGING TOOLS ANYWAYS'); const { identifier } = req.params; if (!identifier) return res.status(400).json({ message: 'Invalid identifier supplied' }); @@ -14,6 +19,8 @@ class linkDELETE extends Route { .where({ identifier }) .first(); + dump(link); + if (!link) return res.status(400).json({ message: 'Identifier doesn\'t exist' }); await db.table('links') -- cgit v1.2.3