aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/albums/link/linkPOST.js
diff options
context:
space:
mode:
authorPitu <[email protected]>2018-09-18 03:34:00 -0300
committerPitu <[email protected]>2018-09-18 03:34:00 -0300
commit4b2b02110b457d8ebeee78e1bdf99eb0660d0626 (patch)
treea6e30208b61e3927c1681c7006241cd0d837de89 /src/api/routes/albums/link/linkPOST.js
parentStupid hash was working, the size changes for some reason when uploading (diff)
downloadhost.fuwn.me-4b2b02110b457d8ebeee78e1bdf99eb0660d0626.tar.xz
host.fuwn.me-4b2b02110b457d8ebeee78e1bdf99eb0660d0626.zip
We can now download albums yayyyy
Diffstat (limited to 'src/api/routes/albums/link/linkPOST.js')
-rw-r--r--src/api/routes/albums/link/linkPOST.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/routes/albums/link/linkPOST.js b/src/api/routes/albums/link/linkPOST.js
index 4b24eae..1edf891 100644
--- a/src/api/routes/albums/link/linkPOST.js
+++ b/src/api/routes/albums/link/linkPOST.js
@@ -9,7 +9,7 @@ class linkPOST extends Route {
super('/album/link/new', 'post');
}
- async run(req, res) {
+ async run(req, res, user) {
if (!req.body) return res.status(400).json({ message: 'No body provided' });
const { albumId } = req.body;
if (!albumId) return res.status(400).json({ message: 'No album provided' });
@@ -35,6 +35,7 @@ class linkPOST extends Route {
try {
await db.table('links').insert({
identifier,
+ userId: user.id,
albumId,
enabled: true,
enableDownload: true,