1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-16 08:30:07 +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) { if (allJobsInFolder) {
const jobSpec = allJobsInFolder.find((j: Job) => j.name === jobName) const jobSpec = allJobsInFolder.find((j: Job) => j.name === jobName)
if (!jobSpec) {
throw new Error('Job was not found.')
}
const jobDefinitionLink = jobSpec?.links.find( const jobDefinitionLink = jobSpec?.links.find(
(l) => l.rel === 'getResource' (l) => l.rel === 'getResource'
)?.href )?.href
if (!jobDefinitionLink) {
throw new Error('Job definition URI was not found.')
}
const requestInfo: any = { const requestInfo: any = {
method: 'GET' method: 'GET'
} }