Сохранение контекста измененного предобработчиком для передачи в постобработчик
This commit is contained in:
parent
3e8a6733bb
commit
2bd317e518
@ -188,10 +188,12 @@ const appProcess = async prms => {
|
|||||||
//Применим ответ "До" - контекст работы сервиса
|
//Применим ответ "До" - контекст работы сервиса
|
||||||
if (!_.isUndefined(resBefore.sCtx))
|
if (!_.isUndefined(resBefore.sCtx))
|
||||||
if (prms.function.nFnType == objServiceFnSchema.NFN_TYPE_LOGIN) {
|
if (prms.function.nFnType == objServiceFnSchema.NFN_TYPE_LOGIN) {
|
||||||
|
prms.service.sCtx = resBefore.sCtx;
|
||||||
|
prms.service.dCtxExp = resBefore.dCtxExp;
|
||||||
await dbConn.setServiceContext({
|
await dbConn.setServiceContext({
|
||||||
nServiceId: prms.service.nId,
|
nServiceId: prms.service.nId,
|
||||||
sCtx: resBefore.sCtx,
|
sCtx: prms.service.sCtx,
|
||||||
dCtxExp: resBefore.dCtxExp
|
dCtxExp: prms.service.dCtxExp
|
||||||
});
|
});
|
||||||
bCtxIsSet = true;
|
bCtxIsSet = true;
|
||||||
}
|
}
|
||||||
@ -260,10 +262,12 @@ const appProcess = async prms => {
|
|||||||
//Применим ответ "После" - контекст работы сервиса
|
//Применим ответ "После" - контекст работы сервиса
|
||||||
if (!_.isUndefined(resAfter.sCtx))
|
if (!_.isUndefined(resAfter.sCtx))
|
||||||
if (prms.function.nFnType == objServiceFnSchema.NFN_TYPE_LOGIN) {
|
if (prms.function.nFnType == objServiceFnSchema.NFN_TYPE_LOGIN) {
|
||||||
|
prms.service.sCtx = resAfter.sCtx;
|
||||||
|
prms.service.dCtxExp = resAfter.dCtxExp;
|
||||||
await dbConn.setServiceContext({
|
await dbConn.setServiceContext({
|
||||||
nServiceId: prms.service.nId,
|
nServiceId: prms.service.nId,
|
||||||
sCtx: resAfter.sCtx,
|
sCtx: prms.service.sCtx,
|
||||||
dCtxExp: resAfter.dCtxExp
|
dCtxExp: prms.service.dCtxExp
|
||||||
});
|
});
|
||||||
bCtxIsSet = true;
|
bCtxIsSet = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user