@dataforsyningen/saul 3.3.1 → 3.3.3

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/config.js.example CHANGED
@@ -2,7 +2,7 @@ export default {
2
2
 
3
3
  // STAC TOKEN can be aquired from https://dataforsyningen.dk/
4
4
  API_STAC_TOKEN: "", // Dataforsyningen token
5
- API_STAC_BASEURL: "https://api.dataforsyningen.dk/rest/skraafoto_api_test/v1.0",
5
+ API_STAC_BASEURL: "https://api.dataforsyningen.dk/rest/skraafoto_api/v1.0",
6
6
 
7
7
  // DHM URL and auth can be aquired from https://datafordeler.dk/dataoversigt/danmarks-hoejdemodel-dhm/koter/
8
8
  API_DHM_WCS_BASEURL: "https://services.datafordeler.dk/DHMNedboer/dhm_wcs/1.0.0/WCS",
package/modules/api.js CHANGED
@@ -95,7 +95,8 @@ function get(url, config = {}, is_json = true) {
95
95
  startLoading()
96
96
  return fetch( url, {
97
97
  ...config,
98
- method: 'GET'
98
+ method: 'GET',
99
+ mode: 'cors'
99
100
  })
100
101
  .then((response) => {
101
102
  return HttpResponseHandler(response, is_json)
@@ -170,7 +171,7 @@ function getDHM(query, auth) {
170
171
  * @returns {object} Response data
171
172
  */
172
173
  function getSTAC(query, auth) {
173
- return get(auth.API_STAC_BASEURL + query, {headers: {'token': auth.API_STAC_TOKEN}})
174
+ return get(auth.API_STAC_BASEURL + query + '&token=' + auth.API_STAC_TOKEN)
174
175
  .then((data) => data)
175
176
  }
176
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataforsyningen/saul",
3
- "version": "3.3.1",
3
+ "version": "3.3.3",
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",