mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
* fix: array web url endpoints * Update package.ts
This commit is contained in:
parent
e3f3825905
commit
fb8b2c40aa
1 changed files with 5 additions and 2 deletions
|
@ -114,7 +114,10 @@ function addPackageWebApi(pkgRouter: Router, storage: Storage, auth: Auth, confi
|
|||
|
||||
// Get package readme
|
||||
pkgRouter.get(
|
||||
'/-/verdaccio/data/package/readme/:scope(@[^/]+)?/:package/:version?',
|
||||
[
|
||||
'/-/verdaccio/data/package/readme/@:scope/:package/:version?',
|
||||
'/-/verdaccio/data/package/readme/:package/:version?',
|
||||
],
|
||||
can('access'),
|
||||
function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
|
||||
const rawScope = req.params.scope; // May include '@'
|
||||
|
@ -138,7 +141,7 @@ function addPackageWebApi(pkgRouter: Router, storage: Storage, auth: Auth, confi
|
|||
);
|
||||
|
||||
pkgRouter.get(
|
||||
'/-/verdaccio/data/sidebar/:scope(@[^/]+)?/:package',
|
||||
['/-/verdaccio/data/sidebar/:scope/:package', '/-/verdaccio/data/sidebar/:package'],
|
||||
can('access'),
|
||||
function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
|
||||
const rawScope = req.params.scope; // May include '@'
|
||||
|
|
Loading…
Reference in a new issue