Skip to content

Commit

Permalink
Merge pull request #734 from Deltares/733-getlocations-request-does-n…
Browse files Browse the repository at this point in the history
…ot-include-bearer-token

Add authorization headers to locations request
  • Loading branch information
ekkelenkamp authored Feb 27, 2024
2 parents e900fe5 + 50997ab commit 2d2561e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/topology/locations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
PiWebserviceProvider,
} from '@deltares/fews-pi-requests'
import { FeatureCollection, Geometry } from 'geojson'
import { createTransformRequestFn } from '../requests/transformRequest'

/**
* Fetch locations for a list of filterIds as GeoJSON.
Expand All @@ -19,7 +20,9 @@ export async function fetchLocationsAsGeoJson(
filterIds: string[],
): Promise<FeatureCollection<Geometry, Location>> {
// Fetch GeoJSON for all filterIds.
const provider = new PiWebserviceProvider(baseUrl)
const provider = new PiWebserviceProvider(baseUrl, {
transformRequestFn: createTransformRequestFn(),
})
const allGeoJson = await Promise.all(
filterIds.map((filterId) =>
fetchLocationsAsGeoJsonForSingleFilterId(provider, filterId),
Expand Down

0 comments on commit 2d2561e

Please sign in to comment.