14 lines
566 B
JavaScript
14 lines
566 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.getUserIdContext = exports.iniUserIdContext = void 0;
|
|
const async_hooks_1 = require("async_hooks");
|
|
const responseAsyncStorage = new async_hooks_1.AsyncLocalStorage();
|
|
const iniUserIdContext = (userId, callback) => {
|
|
responseAsyncStorage.run(userId, callback);
|
|
};
|
|
exports.iniUserIdContext = iniUserIdContext;
|
|
const getUserIdContext = () => {
|
|
return responseAsyncStorage.getStore();
|
|
};
|
|
exports.getUserIdContext = getUserIdContext;
|
|
//# sourceMappingURL=user_id.context.js.map
|