fix: request user id (#1227)

Co-authored-by: sealday <sealday@gmail.com>
Reviewed-on: daoyoucloud/tachybase#1227
This commit is contained in:
sealday 2024-06-21 19:42:16 +08:00
parent 299c01da9f
commit 62f26180b5

View File

@ -53,7 +53,7 @@ async function request(config, context) {
export default class extends Instruction {
async run(node: FlowNodeModel, prevJob, processor: Processor) {
const userId = processor.getScope(node.id).$context.user.id;
const userId = _.get(processor.getScope(node.id), '$context.user.id', '');
// TODO is not work with cluster
const origin = Gateway.getInstance().runAtLoop;
const token = this.workflow.app.authManager.jwt.sign({ userId });