Tarea #542
This commit is contained in:
parent
c48b8c4b99
commit
ea785bd9a1
|
@ -29,7 +29,6 @@ module.exports = Self => {
|
||||||
if (ctx.req.accessToken) {
|
if (ctx.req.accessToken) {
|
||||||
let token = ctx.req.accessToken;
|
let token = ctx.req.accessToken;
|
||||||
let currentUserId = token && token.userId;
|
let currentUserId = token && token.userId;
|
||||||
console.log(currentUserId);
|
|
||||||
isProduction = await models.Account.hasRole(currentUserId, 'Production');
|
isProduction = await models.Account.hasRole(currentUserId, 'Production');
|
||||||
let worker = await models.Worker.findOne({where: {userFk: currentUserId}});
|
let worker = await models.Worker.findOne({where: {userFk: currentUserId}});
|
||||||
params.workerFk = worker.id;
|
params.workerFk = worker.id;
|
||||||
|
|
Loading…
Reference in New Issue