diff options
| author | Pitu <[email protected]> | 2021-06-08 00:33:01 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2021-06-08 00:33:01 +0900 |
| commit | 9b28e56e09ef31052935c00c830ceafd481b94f3 (patch) | |
| tree | 3e01309b801890765b3f5e06f962399f237725a8 /src/api/routes/admin | |
| parent | chore: simplify dev commands (diff) | |
| download | host.fuwn.me-9b28e56e09ef31052935c00c830ceafd481b94f3.tar.xz host.fuwn.me-9b28e56e09ef31052935c00c830ceafd481b94f3.zip | |
chore: get host from req instead of config
Diffstat (limited to 'src/api/routes/admin')
| -rw-r--r-- | src/api/routes/admin/fileGET.js | 2 | ||||
| -rw-r--r-- | src/api/routes/admin/userGET.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/api/routes/admin/fileGET.js b/src/api/routes/admin/fileGET.js index 9605da4..72b96f1 100644 --- a/src/api/routes/admin/fileGET.js +++ b/src/api/routes/admin/fileGET.js @@ -15,7 +15,7 @@ class filesGET extends Route { .select('id', 'username', 'enabled', 'createdAt', 'editedAt', 'apiKeyEditedAt', 'isAdmin') .where({ id: file.userId }) .first(); - file = Util.constructFilePublicLink(file); + file = Util.constructFilePublicLink(req, file); // Additional relevant data const filesFromUser = await db.table('files').where({ userId: user.id }).select('id'); diff --git a/src/api/routes/admin/userGET.js b/src/api/routes/admin/userGET.js index 430dfd7..bf4f912 100644 --- a/src/api/routes/admin/userGET.js +++ b/src/api/routes/admin/userGET.js @@ -37,7 +37,7 @@ class usersGET extends Route { } for (let file of files) { - file = Util.constructFilePublicLink(file); + file = Util.constructFilePublicLink(req, file); } return res.json({ |