authed.js
586 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var express = require('express');
exports = module.exports = function(IoC,policies){
var app = this;
var router= express.Router();
var controller = IoC.create('controllers/authed');
router.get(
'/*',
controller.get
);
router.post(
'/*',
controller.post
);
router.put(
'/*',
controller.put
);
router.patch(
'/*',
controller.patch
);
router.head(
'/*',
controller.head
);
router.delete(
'/*',
controller.delete
);
app.use('/auth_api', router);
};
exports['@require']=['$container','policies'];
exports['@singleton']=true;