fix(striker-ui-api): simplify job data creation in create host connection

main
Tsu-ba-me 1 year ago
parent 8ab0494ae0
commit 4252435c04
  1. 8
      striker-ui-api/src/lib/request_handlers/host/createHostConnection.ts

@ -10,7 +10,7 @@ import {
job, job,
sub, sub,
} from '../../accessModule'; } from '../../accessModule';
import { buildJobData } from '../../buildJobData'; import { buildJobDataFromObject } from '../../buildJobData';
import { sanitize } from '../../sanitize'; import { sanitize } from '../../sanitize';
import { rm, stderr, stdoutVar, systemCall, uuid } from '../../shell'; import { rm, stderr, stdoutVar, systemCall, uuid } from '../../shell';
@ -165,11 +165,11 @@ export const createHostConnection: RequestHandler<
await job({ await job({
file: __filename, file: __filename,
job_command: jobCommand, job_command: jobCommand,
job_data: buildJobData({ job_data: buildJobDataFromObject({
entries: Object.entries({ obj: {
password: commonPassword, password: commonPassword,
peer_job_command: peerJobCommand, peer_job_command: peerJobCommand,
}), },
}), }),
job_description: 'job_0012', job_description: 'job_0012',
job_name: 'striker-peer::add', job_name: 'striker-peer::add',

Loading…
Cancel
Save