diff options
| author | Pitu <[email protected]> | 2021-01-07 02:25:43 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2021-01-07 02:25:43 +0900 |
| commit | 1eccbb3d30505291d1b2588dbf18c3d7e87317d1 (patch) | |
| tree | 38400fc25516c3d418793dfcf7d8cdb4470aef95 /src | |
| parent | chore: remove unused methods (diff) | |
| download | host.fuwn.me-1eccbb3d30505291d1b2588dbf18c3d7e87317d1.tar.xz host.fuwn.me-1eccbb3d30505291d1b2588dbf18c3d7e87317d1.zip | |
chore: cleanup
Diffstat (limited to 'src')
| -rw-r--r-- | src/api/routes/uploads/uploadPOST.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/uploads/uploadPOST.js b/src/api/routes/uploads/uploadPOST.js index 812b385..286a091 100644 --- a/src/api/routes/uploads/uploadPOST.js +++ b/src/api/routes/uploads/uploadPOST.js @@ -255,7 +255,7 @@ class uploadPOST extends Route { const user = await Util.isAuthorized(req); if (!user && process.env.PUBLIC_MODE === 'false') return res.status(401).json({ message: 'Not authorized to use this resource' }); const { finishedchunks } = req.headers; - const albumId = req.headers.albumid ? req.headers.albumid === 'null' ? null : req.headers.albumid : null; // askjdhakjsdhkjhaskjdfhsadjkfghsadjkhgdfkjgh undefined or null as string + const albumId = req.headers.albumid ? req.headers.albumid === 'null' ? null : req.headers.albumid : null; if (albumId && !user) return res.status(401).json({ message: 'Only registered users can upload files to an album' }); if (albumId && user) { const album = await db.table('albums').where({ id: albumId, userId: user.id }).first(); |