fix(striker-ui-api): use common function to build job data for create host connection

main
Tsu-ba-me 1 year ago
parent 12e257357d
commit b31da693a5
  1. 9
      striker-ui-api/src/lib/request_handlers/host/createHostConnection.ts

@ -10,6 +10,7 @@ import {
job, job,
sub, sub,
} from '../../accessModule'; } from '../../accessModule';
import { buildJobData } 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';
@ -164,8 +165,12 @@ export const createHostConnection: RequestHandler<
await job({ await job({
file: __filename, file: __filename,
job_command: jobCommand, job_command: jobCommand,
job_data: `password=${commonPassword} job_data: buildJobData({
peer_job_command=${peerJobCommand}`, entries: Object.entries({
password: commonPassword,
peer_job_command: peerJobCommand,
}),
}),
job_description: 'job_0012', job_description: 'job_0012',
job_name: 'striker-peer::add', job_name: 'striker-peer::add',
job_title: 'job_0011', job_title: 'job_0011',

Loading…
Cancel
Save