Skip to content

Commit 39cfc5f

Browse files
authored
Merge pull request #316 from sentinel-hub/adv-evalscripts-process-api
- use process api v1 also for advanced evalscripts
2 parents f2d447b + 24f5d05 commit 39cfc5f

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

src/layer/AbstractSentinelHubV3Layer.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,7 @@ export class AbstractSentinelHubV3Layer extends AbstractLayer {
233233
// allow subclasses to update payload with their own parameters:
234234
const updatedPayload = await this._updateProcessingGetMapPayload(payload, 0, innerReqConfig, params);
235235
const shServiceHostname = this.getShServiceHostname();
236-
let blob = await processingGetMap(
237-
shServiceHostname,
238-
updatedPayload,
239-
innerReqConfig,
240-
Boolean(params.evalscriptId),
241-
);
236+
let blob = await processingGetMap(shServiceHostname, updatedPayload, innerReqConfig);
242237

243238
// apply effects:
244239
// support deprecated GetMapParams.gain and .gamma parameters

src/layer/processing.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ export async function processingGetMap(
170170
shServiceHostname: string,
171171
payload: ProcessingPayload,
172172
reqConfig: RequestConfiguration,
173-
useV2?: boolean,
174173
): Promise<Blob> {
175174
const authToken = reqConfig && reqConfig.authToken ? reqConfig.authToken : getAuthToken();
176175
if (!authToken) {
@@ -187,10 +186,6 @@ export async function processingGetMap(
187186
responseType: typeof window !== 'undefined' && window.Blob ? 'blob' : 'arraybuffer',
188187
...getAxiosReqParams(reqConfig, CACHE_CONFIG_30MIN),
189188
};
190-
const response = await axios.post(
191-
`${shServiceHostname}api/${useV2 ? 'v2' : 'v1'}/process`,
192-
payload,
193-
requestConfig,
194-
);
189+
const response = await axios.post(`${shServiceHostname}api/v1/process`, payload, requestConfig);
195190
return response.data;
196191
}

0 commit comments

Comments
 (0)