Skip to content

Commit

Permalink
routes pluralized
Browse files Browse the repository at this point in the history
  • Loading branch information
Alino committed Aug 28, 2018
1 parent 490436c commit db905d5
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
module.exports.routes = {

// job
'GET /job': {
'GET /jobs': {
controller: 'JobController',
action: 'find',
swagger: {
summary: 'List all Jobs',
description: 'List all Jobs'
}
},
'POST /job': {
'POST /jobs': {
controller: 'JobController',
action: 'create',
swagger: {
Expand All @@ -43,23 +43,23 @@ module.exports.routes = {
}
},

'DELETE /job/:id': {
'DELETE /jobs/:id': {
controller: 'JobController',
action: 'destroy',
swagger: {
summary: 'Delete a Job',
description: 'Delete a Job'
}
},
'GET /job/:id': {
'GET /jobs/:id': {
controller: 'JobController',
action: 'findOne',
swagger: {
summary: 'Get a Job',
description: 'Get a Job'
}
},
'PUT /job/:id': {
'PUT /jobs/:id': {
controller: 'JobController',
action: 'update',
swagger: {
Expand All @@ -68,7 +68,7 @@ module.exports.routes = {
}
},

'DELETE /job/:parentid/asset/:id': {
'DELETE /jobs/:parentid/assets/:id': {
controller: 'AssetController',
action: 'destroy',
swagger: {
Expand All @@ -79,7 +79,7 @@ module.exports.routes = {
]
}
},
'GET /job/:parentid/asset/:id': {
'GET /jobs/:parentid/assets/:id': {
controller: 'AssetController',
action: 'findOne',
swagger: {
Expand All @@ -98,7 +98,7 @@ module.exports.routes = {
}
}
},
'PUT /job/:parentid/asset/:id': {
'PUT /jobs/:parentid/assets/:id': {
controller: 'AssetController',
action: 'update',
swagger: {
Expand All @@ -123,7 +123,7 @@ module.exports.routes = {
]
}
},
'GET /job/:parentid/asset': {
'GET /jobs/:parentid/assets': {
controller: 'AssetController',
action: 'find',
swagger: {
Expand All @@ -143,7 +143,7 @@ module.exports.routes = {
}
},

'DELETE /asset/:parentid/task/:id': {
'DELETE /assets/:parentid/tasks/:id': {
controller: 'TaskController',
action: 'destroy',
swagger: {
Expand All @@ -154,7 +154,7 @@ module.exports.routes = {
]
}
},
'GET /asset/:parentid/task/:id': {
'GET /assets/:parentid/tasks/:id': {
controller: 'TaskController',
action: 'findOne',
swagger: {
Expand All @@ -165,7 +165,7 @@ module.exports.routes = {
]
}
},
'PUT /asset/:parentid/task/:id': {
'PUT /assets/:parentid/tasks/:id': {
controller: 'TaskController',
action: 'update',
swagger: {
Expand All @@ -176,7 +176,7 @@ module.exports.routes = {
]
}
},
'GET /asset/:parentid/task': {
'GET /assets/:parentid/tasks': {
controller: 'TaskController',
action: 'find',
swagger: {
Expand All @@ -187,7 +187,7 @@ module.exports.routes = {
]
}
},
'POST /asset/:parentid/task': {
'POST /assets/:parentid/tasks': {
controller: 'TaskController',
action: 'create',
swagger: {
Expand All @@ -199,7 +199,7 @@ module.exports.routes = {
}
},

'POST /job/:parentid/asset/uploadfile':
'POST /jobs/:parentid/assets/uploadfile':
{
controller: 'AssetController',
action: 'uploadFile',
Expand Down Expand Up @@ -240,7 +240,7 @@ module.exports.routes = {
}
}
},
'GET /job/:parentid/asset/:id/downloadfile': {
'GET /jobs/:parentid/assets/:id/downloadfile': {
controller: 'AssetController',
action: 'downloadFile',
swagger: {
Expand All @@ -259,7 +259,7 @@ module.exports.routes = {
}
}
},
'POST /asset/:parentid/task/:id/uploaddeliverable': {
'POST /assets/:parentid/tasks/:id/uploaddeliverable': {
controller: 'TaskController',
action: 'uploadFile',
swagger: {
Expand Down Expand Up @@ -298,7 +298,7 @@ module.exports.routes = {
}
}
},
'GET /asset/:parentid/task/:id/downloaddeliverable': {
'GET /assets/:parentid/tasks/:id/downloaddeliverable': {
controller: 'TaskController',
action: 'downloadFile',
swagger: {
Expand All @@ -322,7 +322,7 @@ module.exports.routes = {
},

// task
'GET /task': {
'GET /tasks': {
controller: 'TaskController',
action: 'find',
swagger: {
Expand All @@ -332,7 +332,7 @@ module.exports.routes = {
},

// asset
'GET /asset': {
'GET /assets': {
controller: 'AssetController',
action: 'find',
swagger: {
Expand All @@ -342,15 +342,15 @@ module.exports.routes = {
},

// webhook
'GET /webhook': {
'GET /webhooks': {
controller: 'WebhookController',
action: 'find',
swagger: {
summary: 'List all Webhooks',
description: 'List all Webhooks'
}
},
'POST /webhook': {
'POST /webhooks': {
controller: 'WebhookController',
action: 'create',
swagger: {
Expand All @@ -359,23 +359,23 @@ module.exports.routes = {
}
},

'DELETE /webhook/:id': {
'DELETE /webhooks/:id': {
controller: 'WebhookController',
action: 'destroy',
swagger: {
summary: 'Delete a Webhook',
description: 'Delete a Webhook'
}
},
'GET /webhook/:id': {
'GET /webhooks/:id': {
controller: 'WebhookController',
action: 'findOne',
swagger: {
summary: 'Get a Webhook',
description: 'Get a Webhook'
}
},
'PUT /webhook/:id': {
'PUT /webhooks/:id': {
controller: 'WebhookController',
action: 'update',
swagger: {
Expand Down

0 comments on commit db905d5

Please sign in to comment.