diff --git a/package-lock.json b/package-lock.json index 6976a82..ebf54cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sanity-plugin-studio-smartling", - "version": "1.4.1", + "version": "1.5.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sanity-plugin-studio-smartling", - "version": "1.4.1", + "version": "1.5.0", "license": "MIT", "dependencies": { "sanity-naive-html-serializer": "^1.3.0", diff --git a/package.json b/package.json index 38d0400..ce2dce4 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.4.1", + "version": "1.5.0", "license": "MIT", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/src/adapter/getTranslationTask.ts b/src/adapter/getTranslationTask.ts index 621715e..960ee92 100644 --- a/src/adapter/getTranslationTask.ts +++ b/src/adapter/getTranslationTask.ts @@ -20,10 +20,11 @@ export const getTranslationTask = async ( } } - const url = `https://api.smartling.com/jobs-api/v3/projects/${secrets.project}/jobs/${taskId}/progress` + const projectId = secrets.project + const progressUrl = `https://api.smartling.com/jobs-api/v3/projects/${projectId}/jobs/${taskId}/progress` const smartlingTask = await fetch(smartlingProxy, { method: 'POST', - headers: getHeaders(url, accessToken), + headers: getHeaders(progressUrl, accessToken), }) .then(res => res.json()) .then(res => res.response.data) @@ -41,5 +42,6 @@ export const getTranslationTask = async ( locales, //since our download is tied to document id for smartling, keep track of it as a task taskId: documentId, + linkToVendorTask: `https://dashboard.smartling.com/app/projects/${projectId}/account-jobs/${projectId}:${taskId}`, } }