File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -40,18 +40,23 @@ export default class ProxyAudit {
4040
4141 return fetchAu ;
4242 } ;
43- /* eslint new-cap:off */
44- const router = express . Router ( ) ;
45- /* eslint new-cap:off */
46- router . use ( compression ( ) ) ;
47- router . use ( bodyParser . json ( { strict : false , limit : '50mb' } ) ) ;
48- router . post ( '/audits' , ( req : $RequestExtend , res : $ResponseExtend ) => {
43+
44+ const handleAudit = ( req : $RequestExtend , res : $ResponseExtend ) => {
4945 if ( this . enabled ) {
5046 fetchAudit ( req , res ) ;
5147 } else {
5248 res . status ( 500 ) . end ( ) ;
5349 }
54- } ) ;
50+ } ;
51+
52+ /* eslint new-cap:off */
53+ const router = express . Router ( ) ;
54+ /* eslint new-cap:off */
55+ router . use ( compression ( ) ) ;
56+ router . use ( bodyParser . json ( { strict : false , limit : '50mb' } ) ) ;
57+ router . post ( '/audits' , handleAudit ) ;
58+
59+ router . post ( '/audits/quick' , handleAudit ) ;
5560
5661 app . use ( '/-/npm/v1/security' , router ) ;
5762 }
You can’t perform that action at this time.
0 commit comments