Merge pull request #6986 from HabitRPG/api-v3-one-app

[Api v3] Consolidate server code and share middlewares where possible
This commit is contained in:
Matteo Pagliazzi
2016-04-01 19:30:52 +02:00
24 changed files with 420 additions and 267 deletions
+21
View File
@@ -0,0 +1,21 @@
let api = {};
/**
* @api {get} /status Get Habitica's status
* @apiVersion 3.0.0
* @apiName GetStatus
* @apiGroup Status
*
* @apiSuccess {status} string 'up' if everything is ok
*/
api.getStatus = {
method: 'GET',
url: '/status',
async handler (req, res) {
res.respond(200, {
status: 'up',
});
},
};
module.exports = api;