m
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
"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
|
||||
Reference in New Issue
Block a user