| 1234567891011121314151617181920 |
- const C = require('./controllers')
- const { routes:crudRoutes } = require('@alancnet/material-framework/lib/crud')
- module.exports = app => {
- app.get('/api/statistics', C.auth.verify('METRICS_VIEW'), C.statistics.get)
- crudRoutes({ app, apiPrefix: '/api/staff-members/:terminal', controller: C.staffMember, camelName: 'staffMember' })
- // crudRoutes({ app, controller: C.staffMember, camelName: 'staffMember' })
- crudRoutes({ app, controller: C.staffingAgency, camelName: 'staffingAgency' })
- // Labor
- app.get('/api/labor/:terminal', C.labor.list)
- app.get('/api/labor/:terminal/:week', C.labor.get)
- app.patch('/api/labor/:terminal/:week', C.labor.patch)
- // Services
- app.get('/api/services/:terminal', C.services.list)
- app.get('/api/services/:terminal/:week', C.services.get)
- app.patch('/api/services/:terminal/:week', C.services.patch)
- }
|