pomodoro/server/services/pomodoros/routes.js
2016-08-14 19:18:09 +02:00

14 lines
535 B
JavaScript

'use strict'
//const isAuthenticated = require('express-module-membership/passport/authorization-middleware').isAuthenticated;
const isAuthenticated = (req, res, next) => next()
const mw = require('./middleware')
module.exports = [
[ '/api/pomodoros', 'post', [ isAuthenticated, mw.create ]],
[ '/api/pomodoros/:id', 'patch', [ isAuthenticated, mw.patch ]],
//[ '/api/pomodoros', 'get', [ mw.authorization.isAuthenticated, mw.pomodoros.getActive ]]
[ '/api/pomodoros', 'get', [ isAuthenticated, mw.formatQuery, mw.find ]]
]