Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ follow these steps:

- To deploy to stating (rdocumentation.datacamp-staging.com), merge to master
- To deploy to production, add a tag which starts with `release-`

The rdocumentation app is hosted on DataCamp's infrastructure, on our AWS ECS cluster.

## What the CI does
Expand Down
10 changes: 6 additions & 4 deletions api/controllers/PackageController.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module.exports = {
* @apiSuccess {Integer} versions.maintainer_id Id of the maintainer of the package version
* @apiSuccess {String} type Always 'package'
*/

findByName: function(req, res) {
var packageName = req.param('name');

Expand Down Expand Up @@ -85,8 +84,10 @@ module.exports = {
* @api {get} /packages List all packages
* @apiName Get Packages
* @apiGroup Package
* @apiDescription Return an array of package object containing listed attributes
* @apiDescription Return an array of package object containing listed attributes and total number of package objects header.
*
* @apiHeader (Header) {String} x-total-count total count of packages.
*
* @apiParam {String} limit the number to use when limiting records to send back (useful for pagination)
* @apiParam {String} skip the number of records to skip when limiting (useful for pagination)
* @apiParam {String} sort the order of returned records, e.g. `name ASC` or `name DESC`
Expand All @@ -106,15 +107,16 @@ module.exports = {
var limit = Utils.parseLimit(req);
var offset = Utils.parseSkip(req);
var sort = Utils.parseSort(req);
var criteria = Utils.parseCriteria(req);
var criteria = Utils.parseCriteria(req);

Package.findAll({
where: criteria,
limit: limit,
where: criteria,
offset: offset,
order: sort,
include: []
}).then(function(packages) {
res.set('X-Total-Count', packages.length);
return res.json(packages);
}).catch(function(err) {
return res.negotiate(err);
Expand Down
2 changes: 1 addition & 1 deletion config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
module.exports.routes = {
// Homepage
'get /': 'HomeController.index',
'get /status': 'HomeController.status',
'get /status': 'HomeController.status',

// Authentication
'get /login': 'AuthController.login',
Expand Down
2 changes: 1 addition & 1 deletion views/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<% } %>

<!--TEMPLATES-->

<!--TEMPLATES END-->

<script src="<%= protocol %>//code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
Expand Down