1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-09 21:30:05 +00:00

Merge pull request #92 from sasjs/issue87

Issue87
This commit is contained in:
Yury Shkoda
2020-09-18 08:41:59 +03:00
committed by GitHub

View File

@@ -1001,9 +1001,19 @@ export class SASViyaApiClient {
if (allJobsInFolder) {
const jobSpec = allJobsInFolder.find((j: Job) => j.name === jobName)
if (!jobSpec) {
throw new Error('Job was not found.')
}
const jobDefinitionLink = jobSpec?.links.find(
(l) => l.rel === 'getResource'
)?.href
if (!jobDefinitionLink) {
throw new Error('Job definition URI was not found.')
}
const requestInfo: any = {
method: 'GET'
}