@@ -5,39 +5,39 @@ var redisModel = require('../models/redis');
55
66module . exports = function ( app ) {
77 app . get ( '/api/jobs/pending/status/:type' , function ( req , res ) {
8- var type = req . param ( " type" ) ;
8+ var type = req . params [ ' type' ] ;
99 redisModel . makePendingByType ( type ) . done ( function ( results ) {
1010 res . json ( results ) ;
1111 } ) ;
1212 } ) ;
1313
1414 app . get ( '/api/jobs/pending/id/:type/:id' , function ( req , res ) {
15- var id = req . param ( "id" ) ,
16- type = req . param ( " type" ) ;
15+ var id = req . params [ 'id' ] ,
16+ type = req . params [ ' type' ] ;
1717 redisModel . makePendingById ( type , id ) . done ( function ( results ) {
1818 res . json ( results ) ;
1919 } ) ;
2020 } ) ;
2121
2222 app . get ( '/api/jobs/delete/status/:type' , function ( req , res ) {
23- var type = req . param ( " type" ) ;
24- var queueName = req . param ( " queueName" ) ? req . param ( " queueName" ) : null ;
23+ var type = req . params [ ' type' ] ;
24+ var queueName = req . params [ ' queueName' ] ? req . params [ ' queueName' ] : null ;
2525 redisModel . deleteJobByStatus ( type , queueName ) . done ( function ( results ) {
2626 res . json ( results ) ;
2727 } ) ;
2828 } ) ;
2929
3030 app . get ( '/api/jobs/delete/id/:type/:id' , function ( req , res ) {
31- var id = req . param ( "id" ) ,
32- type = req . param ( " type" ) ;
31+ var id = req . params [ 'id' ] ,
32+ type = req . params [ ' type' ] ;
3333 redisModel . deleteJobById ( type , id ) . done ( function ( results ) {
3434 res . json ( results ) ;
3535 } ) ;
3636 } ) ;
3737
3838 app . get ( '/api/jobs/info/:type/:id' , function ( req , res ) {
39- var id = req . param ( "id" ) ,
40- type = req . param ( " type" ) ;
39+ var id = req . params [ 'id' ] ,
40+ type = req . params [ ' type' ] ;
4141 redisModel . getDataById ( type , id ) . done ( function ( results ) {
4242 res . json ( results ) ;
4343 } ) ;
0 commit comments