auth.js
4.3 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
var express = require("express");
var payRoll = require("../json/payRoll.json");
exports = module.exports = function (IoC, policies, settings) {
var app = this;
var router = express.Router();
var router2 = express.Router();
var controller = IoC.create("controllers/auth");
if (settings.prefix.length > 0) {
// router.get("/index", controller.index);
router.get("/signOut", controller.signOut);
}
router.get("/img/*", controller.getImg);
router2.get("/", controller.indexPrefix);
router.get("/productDes", controller.productDes);
router.get("/register", controller.register);
router.get("/mobileRegister", controller.mobileRegister);
router.get("/mobileRegisterSuccess", controller.mobileRegisterSuccess);
router.get("/signIn", controller.signIn);
router.post("/doLogin", controller.doLogin);
router2.get("/signOut", controller.signOut);
router.post("/smsCodes", controller.smsCodes);
router.post("/tenants", controller.tenants);
router.post("/resetPass", policies.ensureLoggedOut(), controller.resetPass);
router.post(
"/updatePassword",
policies.ensureLoggedOut(),
controller.updatePassword
);
router.post(
"/loadUserInfo",
policies.ensureLoggedOut(),
controller.loadUserInfo
);
router.post(
"/getUploaderToken",
policies.ensureLoggedOut(),
controller.getUploaderToken
);
router.post(
"/delOSSObject",
policies.ensureLoggedOut(),
controller.delOSSObject
);
router.post("/smsVerification", controller.smsVerification);
router.post("/getObjectTokenByID", controller.getObjectTokenByID);
// router.get(
// '/healthMonitor',
// controller.healthMonitor
// )
// router.head(
// '/healthMonitor',
// controller.healthMonitor
// )
router.post(
"/getUserRoles",
policies.ensureLoggedOut(),
controller.getUserRoles
);
router.post("/getRoles", policies.ensureLoggedOut(), controller.getRoles);
router.post(
"/updateUserRoles",
policies.ensureLoggedOut(),
controller.updateUserRoles
);
router.post("/getTenant", policies.ensureLoggedOut(), controller.getTenant);
router.post(
"/updateTenant",
policies.ensureLoggedOut(),
controller.updateTenant
);
router.get("/offer/:requestId", controller.offer);
router.post(
"/onboardStatus",
policies.ensureLoggedOut(),
controller.onboardStatus
);
router.get("/downloadApp", controller.dowloadApp);
router.get("/info/policy", controller.softwareLicense);
router.get("/payRoll", function (req, res, next) {
res.send(payRoll);
});
router.get("/recharge", controller.recharge);
router.post("/changePassForRegister", controller.changePassForRegister);
router.post(
"/changeTenant",
policies.ensureLoggedOut(),
controller.changeTenant
);
router.post("/hr/sendRejectOffer", controller.sendRejectOffer);
router.post("/hr/acceptOffer", controller.acceptOffer);
router.post("/imTokens", policies.ensureLoggedOut(), controller.imTokens);
router.post(
"/listChannels",
policies.ensureLoggedOut(),
controller.listChannels
);
router.post(
"/getTastLink",
policies.ensureLoggedOut(),
controller.getTastLink
);
router.get("/filemeta", policies.ensureLoggedOut(), controller.filemeta);
router.get(
"/getCustomerQrcode",
policies.ensureLoggedOut(),
controller.getCustomerQrcode
);
router.get(
"/getPositionQrcode",
policies.ensureLoggedOut(),
controller.getPositionQrcode
);
router.get(
//微店模板路由
"/minishop/:id",
controller.weidianTempLate
);
router.get("/wso-workai", controller.workaiSecurityOAuth);
router.get(
"/socialwork/freedom-jobs/emps/:id/:verification",
controller.freedomJobsEmp
);
router.get("/socialwork/freedom-jobs/emps/:id", controller.freedomJobsEmp);
router.get("/getShortToken", controller.getShortToken);
router.get("/gainianrenli/*",controller.getImg)
router.get("/waifu_img/*",controller.getImg)
router.get("/my_img/*",controller.getImg)
router.get("/invoice_file_icon/*",controller.getImg)
router.get("/gainianrenli/*",controller.getImg)
router.get("/claim_icons/*",controller.getImg)
app.use("/", router);
app.use("/index", router2);
};
exports["@require"] = ["$container", "policies", "igloo/settings"];
exports["@singleton"] = true;