From b39e86f4a79cdf3576c8caac50c0f50dfbf4cb4f Mon Sep 17 00:00:00 2001 From: sotojn Date: Wed, 16 Oct 2024 16:21:06 -0700 Subject: [PATCH] refactor job api GET --- packages/teraslice/src/lib/cluster/services/api.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/teraslice/src/lib/cluster/services/api.ts b/packages/teraslice/src/lib/cluster/services/api.ts index ac58bd3b801..729026e4c0e 100644 --- a/packages/teraslice/src/lib/cluster/services/api.ts +++ b/packages/teraslice/src/lib/cluster/services/api.ts @@ -286,12 +286,12 @@ export class ApiService { }); v1routes.get('/jobs/:jobId', (req, res) => { - const includeEx = req.query.ex; + const { ex } = req.query; const { jobId } = req.params; // @ts-expect-error const requestHandler = handleTerasliceRequest(req as TerasliceRequest, res, 'Could not retrieve job'); - typeof includeEx === 'string' - ? requestHandler(async () => this.jobsService.getJobWithExInfo(jobId, includeEx.split(','))) + typeof ex === 'string' + ? requestHandler(async () => this.jobsService.getJobWithExInfo(jobId, ex.split(','))) : requestHandler(async () => this.jobsStorage.get(jobId)); });