@dataforsyningen/saul 4.1.2 → 4.2.0

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.
Files changed (2) hide show
  1. package/modules/api.js +1 -7
  2. package/package.json +1 -1
package/modules/api.js CHANGED
@@ -170,13 +170,7 @@ function getDHM(query, auth) {
170
170
  */
171
171
  function getSTAC(query, auth) {
172
172
  let requestUrl = `${auth.API_STAC_BASEURL}${query}`
173
- const queryStr = query.split('?')[1]
174
- if (queryStr) {
175
- requestUrl += `&token=${auth.API_STAC_TOKEN}`
176
- } else {
177
- requestUrl += `?token=${auth.API_STAC_TOKEN}`
178
- }
179
- return get(requestUrl)
173
+ return get(requestUrl, {headers: {token: auth.API_STAC_TOKEN}})
180
174
  .then((data) => data)
181
175
  }
182
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataforsyningen/saul",
3
- "version": "4.1.2",
3
+ "version": "4.2.0",
4
4
  "description": "This is a collection of stand-alone methods for photogrammetry calculations and API interactions for 'Danske Skråfotos'.",
5
5
  "main": "index.js",
6
6
  "type": "module",