generaltranslation 8.2.17 → 8.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/dist/translate/utils/generateRequestHeaders.js +2 -7
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -329,10 +329,9 @@ const API_VERSION$1 = "2026-03-06.v1";
|
|
|
329
329
|
function generateRequestHeaders(config, excludeContentType = false) {
|
|
330
330
|
const authHeaders = {
|
|
331
331
|
...!excludeContentType && { "Content-Type": "application/json" },
|
|
332
|
-
"
|
|
332
|
+
"gt-project-id": config.projectId
|
|
333
333
|
};
|
|
334
|
-
if (config.apiKey)
|
|
335
|
-
else authHeaders["x-gt-api-key"] = config.apiKey;
|
|
334
|
+
if (config.apiKey) authHeaders["Authorization"] = `Bearer ${config.apiKey}`;
|
|
336
335
|
authHeaders["gt-api-version"] = API_VERSION$1;
|
|
337
336
|
return authHeaders;
|
|
338
337
|
}
|