parent
bc69d086f7
commit
bade9a8d28
|
@ -7,7 +7,6 @@ import serveStaticFile from './serveStaticFile';
|
|||
* Send the file, JSON metadata, or HTML directory listing.
|
||||
*/
|
||||
export default function serveFile(req, res) {
|
||||
// Deprecated.
|
||||
if (req.query.meta != null) {
|
||||
return serveMetadata(req, res);
|
||||
}
|
||||
|
@ -16,7 +15,6 @@ export default function serveFile(req, res) {
|
|||
return serveAutoIndexPage(req, res);
|
||||
}
|
||||
|
||||
// Deprecated.
|
||||
if (req.query.module != null) {
|
||||
return serveModule(req, res);
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@ import createSearch from '../utils/createSearch';
|
|||
|
||||
const knownQueryParams = {
|
||||
main: true, // Deprecated, see #63
|
||||
meta: true, // Deprecated
|
||||
module: true // Deprecated
|
||||
meta: true,
|
||||
module: true
|
||||
};
|
||||
|
||||
function isKnownQueryParam(param) {
|
||||
|
|
|
@ -3,8 +3,6 @@ import express from 'express';
|
|||
// import serveAuth from './actions/serveAuth';
|
||||
import serveFile from './actions/serveFile';
|
||||
import serveMainPage from './actions/serveMainPage';
|
||||
import serveMetadata from './actions/serveMetadata';
|
||||
import serveModule from './actions/serveModule';
|
||||
import servePublicKey from './actions/servePublicKey';
|
||||
import serveStats from './actions/serveStats';
|
||||
|
||||
|
@ -51,36 +49,6 @@ app.use(
|
|||
})
|
||||
);
|
||||
|
||||
app.use(
|
||||
'/_metadata',
|
||||
createRouter(app => {
|
||||
app.get(
|
||||
'*',
|
||||
validatePackageURL,
|
||||
validatePackageName,
|
||||
validateQuery,
|
||||
fetchPackage,
|
||||
findFile,
|
||||
serveMetadata
|
||||
);
|
||||
})
|
||||
);
|
||||
|
||||
app.use(
|
||||
'/_module',
|
||||
createRouter(app => {
|
||||
app.get(
|
||||
'*',
|
||||
validatePackageURL,
|
||||
validatePackageName,
|
||||
validateQuery,
|
||||
fetchPackage,
|
||||
findFile,
|
||||
serveModule
|
||||
);
|
||||
})
|
||||
);
|
||||
|
||||
app.get(
|
||||
'*',
|
||||
validatePackageURL,
|
||||
|
|
Loading…
Reference in New Issue