[web] remove dead endpoints for downloading clsi output w/o buildId (#24825)
The corresponding clsi endpoints have already been removed. GitOrigin-RevId: 0414040557f50dae6ad58228eefae7b2739a5656
This commit is contained in:
@@ -607,25 +607,6 @@ async function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
||||
CompileController.stopCompile
|
||||
)
|
||||
|
||||
// LEGACY: Used by the web download buttons, adds filename header, TODO: remove at some future date
|
||||
webRouter.get(
|
||||
'/project/:Project_id/output/output.pdf',
|
||||
AuthorizationMiddleware.ensureUserCanReadProject,
|
||||
CompileController.downloadPdf
|
||||
)
|
||||
|
||||
// PDF Download button
|
||||
webRouter.get(
|
||||
/^\/download\/project\/([^/]*)\/output\/output\.pdf$/,
|
||||
function (req, res, next) {
|
||||
const params = { Project_id: req.params[0] }
|
||||
req.params = params
|
||||
next()
|
||||
},
|
||||
AuthorizationMiddleware.ensureUserCanReadProject,
|
||||
CompileController.downloadPdf
|
||||
)
|
||||
|
||||
webRouter.get(
|
||||
'/project/:Project_id/output/cached/output.overleaf.json',
|
||||
AuthorizationMiddleware.ensureUserCanReadProject,
|
||||
@@ -640,15 +621,7 @@ async function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
||||
|
||||
// PDF Download button for specific build
|
||||
webRouter.get(
|
||||
/^\/download\/project\/([^/]*)\/build\/([0-9a-f-]+)\/output\/output\.pdf$/,
|
||||
function (req, res, next) {
|
||||
const params = {
|
||||
Project_id: req.params[0],
|
||||
build_id: req.params[1],
|
||||
}
|
||||
req.params = params
|
||||
next()
|
||||
},
|
||||
'/download/project/:Project_id/build/:build_id/output/output.pdf',
|
||||
AuthorizationMiddleware.ensureUserCanReadProject,
|
||||
CompileController.downloadPdf
|
||||
)
|
||||
@@ -659,22 +632,7 @@ async function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
||||
{ params: ['Project_id'] }
|
||||
)
|
||||
|
||||
// Used by the pdf viewers
|
||||
webRouter.get(
|
||||
/^\/project\/([^/]*)\/output\/(.*)$/,
|
||||
function (req, res, next) {
|
||||
const params = {
|
||||
Project_id: req.params[0],
|
||||
file: req.params[1],
|
||||
}
|
||||
req.params = params
|
||||
next()
|
||||
},
|
||||
rateLimiterMiddlewareOutputFiles,
|
||||
AuthorizationMiddleware.ensureUserCanReadProject,
|
||||
CompileController.getFileFromClsi
|
||||
)
|
||||
// direct url access to output files for a specific build (query string not required)
|
||||
// direct url access to output files for a specific build
|
||||
webRouter.get(
|
||||
/^\/project\/([^/]*)\/build\/([0-9a-f-]+)\/output\/(.*)$/,
|
||||
function (req, res, next) {
|
||||
@@ -691,24 +649,7 @@ async function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
||||
CompileController.getFileFromClsi
|
||||
)
|
||||
|
||||
// direct url access to output files for user but no build, to retrieve files when build fails
|
||||
webRouter.get(
|
||||
/^\/project\/([^/]*)\/user\/([0-9a-f-]+)\/output\/(.*)$/,
|
||||
function (req, res, next) {
|
||||
const params = {
|
||||
Project_id: req.params[0],
|
||||
user_id: req.params[1],
|
||||
file: req.params[2],
|
||||
}
|
||||
req.params = params
|
||||
next()
|
||||
},
|
||||
rateLimiterMiddlewareOutputFiles,
|
||||
AuthorizationMiddleware.ensureUserCanReadProject,
|
||||
CompileController.getFileFromClsi
|
||||
)
|
||||
|
||||
// direct url access to output files for a specific user and build (query string not required)
|
||||
// direct url access to output files for a specific user and build
|
||||
webRouter.get(
|
||||
/^\/project\/([^/]*)\/user\/([0-9a-f]+)\/build\/([0-9a-f-]+)\/output\/(.*)$/,
|
||||
function (req, res, next) {
|
||||
@@ -1004,20 +945,6 @@ async function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
||||
InactiveProjectController.deactivateProject
|
||||
)
|
||||
|
||||
privateApiRouter.get(
|
||||
/^\/internal\/project\/([^/]*)\/output\/(.*)$/,
|
||||
function (req, res, next) {
|
||||
const params = {
|
||||
Project_id: req.params[0],
|
||||
file: req.params[1],
|
||||
}
|
||||
req.params = params
|
||||
next()
|
||||
},
|
||||
AuthenticationController.requirePrivateApiAuth(),
|
||||
CompileController.getFileFromClsi
|
||||
)
|
||||
|
||||
privateApiRouter.get(
|
||||
'/project/:Project_id/doc/:doc_id',
|
||||
AuthenticationController.requirePrivateApiAuth(),
|
||||
|
||||
Reference in New Issue
Block a user