v3: port static pages, make routes lib more flexible, share middlewares between v2 and v3, port v1, simplify server.js
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user