mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-18 17:21:33 +00:00
revert: last 2 commits
this reverts commit0e4f483506
andaca4a02f53
lel, im going crazy with this
This commit is contained in:
parent
0e4f483506
commit
4bb0af4ca7
@ -45,7 +45,7 @@
|
||||
"fluent-ffmpeg": "~2.1.2",
|
||||
"fresh": "~0.5.2",
|
||||
"helmet": "~5.1.1",
|
||||
"hyper-express": "6.4.5",
|
||||
"hyper-express": "6.4.2",
|
||||
"jszip": "~3.10.1",
|
||||
"knex": "~2.2.0",
|
||||
"live-directory": "~2.3.2",
|
||||
|
@ -43,14 +43,11 @@ routes.post('/users/edit', [auth.requireUser, utils.assertJSON], auth.editUser)
|
||||
|
||||
/** ./controllers/uploadController.js */
|
||||
|
||||
const uploadRouteOptions = {
|
||||
// HyperExpress defaults to 250kb
|
||||
// https://github.com/kartikk221/hyper-express/blob/6.4.5/docs/Server.md#server-constructor-options
|
||||
max_body_length: parseInt(config.uploads.maxSize) * 1e6,
|
||||
middlewares: [auth.optionalUser]
|
||||
}
|
||||
routes.post('/upload', uploadRouteOptions, upload.upload)
|
||||
routes.post('/upload/:albumid', uploadRouteOptions, upload.upload)
|
||||
// HyperExpress defaults to 250kb
|
||||
// https://github.com/kartikk221/hyper-express/blob/6.4.4/docs/Server.md#server-constructor-options
|
||||
const maxBodyLength = parseInt(config.uploads.maxSize) * 1e6
|
||||
routes.post('/upload', { max_body_length: maxBodyLength }, auth.optionalUser, upload.upload)
|
||||
routes.post('/upload/:albumid', { max_body_length: maxBodyLength }, auth.optionalUser, upload.upload)
|
||||
routes.post('/upload/finishchunks', [auth.optionalUser, utils.assertJSON], upload.finishChunks)
|
||||
|
||||
routes.get('/uploads', auth.requireUser, upload.list)
|
||||
|
@ -12,11 +12,10 @@ routes.get('/nojs', async (req, res) => {
|
||||
})
|
||||
})
|
||||
|
||||
routes.post('/nojs', {
|
||||
// HyperExpress defaults to 250kb
|
||||
// https://github.com/kartikk221/hyper-express/blob/6.4.4/docs/Server.md#server-constructor-options
|
||||
max_body_length: parseInt(config.uploads.maxSize) * 1e6
|
||||
}, async (req, res) => {
|
||||
// HyperExpress defaults to 250kb
|
||||
// https://github.com/kartikk221/hyper-express/blob/6.4.4/docs/Server.md#server-constructor-options
|
||||
const maxBodyLength = parseInt(config.uploads.maxSize) * 1e6
|
||||
routes.post('/nojs', { max_body_length: maxBodyLength }, async (req, res) => {
|
||||
res._json = res.json
|
||||
res.json = (...args) => {
|
||||
const result = args[0]
|
||||
|
@ -2972,10 +2972,10 @@ https-proxy-agent@^5.0.0:
|
||||
agent-base "6"
|
||||
debug "4"
|
||||
|
||||
hyper-express@6.4.5:
|
||||
version "6.4.5"
|
||||
resolved "https://registry.yarnpkg.com/hyper-express/-/hyper-express-6.4.5.tgz#14b9141cb15fc8c349774ecd335b710dd21b783a"
|
||||
integrity sha512-50Dl0mftcxgxg9KM/f1jIXAE3yaX92XtNzP4NWqEXPqPTrED9KbY1oeVPSU6rGIJFjyhsJ0ZOYfhP+NpWUUPcQ==
|
||||
hyper-express@6.4.2:
|
||||
version "6.4.2"
|
||||
resolved "https://registry.yarnpkg.com/hyper-express/-/hyper-express-6.4.2.tgz#f3828cda1bf64c67287907d29bd6ea7270f2e4eb"
|
||||
integrity sha512-R4cvUrdDYpulzer6GShRVZQs6V69HRwkV28Y+e3YnSMh2nYf0ipvCmCbOOKbcecUs64cNbY49hujht/njYAgLw==
|
||||
dependencies:
|
||||
"@types/busboy" "^0.3.1"
|
||||
"@types/express" "^4.17.13"
|
||||
|
Loading…
Reference in New Issue
Block a user