aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/files
diff options
context:
space:
mode:
authorKana <[email protected]>2021-06-19 02:03:57 +0900
committerGitHub <[email protected]>2021-06-19 02:03:57 +0900
commit065c5221a0250838f1d1f9bb7a7922ff4f55e038 (patch)
tree8a69a81f00e6bff2752f4f7c59dcbbf21f893b20 /src/api/routes/files
parentchore: docs update (diff)
parentfix: potentially fix the blocked extensions array splitting (diff)
downloadhost.fuwn.me-065c5221a0250838f1d1f9bb7a7922ff4f55e038.tar.xz
host.fuwn.me-065c5221a0250838f1d1f9bb7a7922ff4f55e038.zip
Merge pull request #278 from Zephyrrus/Zephyrrus-feature/database_based_settings
Zephyrrus feature/database based settings
Diffstat (limited to 'src/api/routes/files')
-rw-r--r--src/api/routes/files/fileGET.js2
-rw-r--r--src/api/routes/files/filesGET.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/api/routes/files/fileGET.js b/src/api/routes/files/fileGET.js
index 9ec6f22..2e6f0b8 100644
--- a/src/api/routes/files/fileGET.js
+++ b/src/api/routes/files/fileGET.js
@@ -16,7 +16,7 @@ class fileGET extends Route {
let file = await db.table('files').where({ id, userId: user.id }).first();
if (!file) return res.status(400).json({ message: 'The file doesn\'t exist or doesn\'t belong to the user' });
- file = Util.constructFilePublicLink(file);
+ file = Util.constructFilePublicLink(req, file);
/*
Fetch the albums
diff --git a/src/api/routes/files/filesGET.js b/src/api/routes/files/filesGET.js
index 9e90633..20ccbc5 100644
--- a/src/api/routes/files/filesGET.js
+++ b/src/api/routes/files/filesGET.js
@@ -30,7 +30,7 @@ class filesGET extends Route {
// For each file, create the public link to be able to display the file
for (let file of files) {
- file = Util.constructFilePublicLink(file);
+ file = Util.constructFilePublicLink(req, file);
}
return res.json({