use cron middleware

This commit is contained in:
Matteo Pagliazzi
2015-12-15 12:11:32 +01:00
parent e547eb2dde
commit 13cbf03759
9 changed files with 27 additions and 20 deletions

View File

@@ -1,4 +1,5 @@
import { authWithHeaders } from '../../middlewares/api-v3/auth';
import cron from '../../middlewares/api-v3/cron';
import common from '../../../../common';
let api = {};
@@ -13,7 +14,7 @@ let api = {};
*/
api.getUser = {
method: 'GET',
middlewares: [authWithHeaders()],
middlewares: [authWithHeaders(), cron],
url: '/user',
handler (req, res) {
let user = res.locals.user.toJSON();