Skip to content

Commit

Permalink
change to token
Browse files Browse the repository at this point in the history
  • Loading branch information
mpothier committed Sep 12, 2024
1 parent 19b012d commit ae00cc5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions services/__tests__/geocoding-v6.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('forwardGeocode', () => {
language: 'de',
worldview: 'us',
permanent: true,
sessionId: 'abc123',
session_token: 'abc123',

// structured input parameters will be ignored in normal mode
address_line1: '12 main',
Expand Down Expand Up @@ -62,7 +62,7 @@ describe('forwardGeocode', () => {
language: 'de',
worldview: 'us',
permanent: 'true',
sessionId: 'abc123'
session_token: 'abc123'
}
});
});
Expand All @@ -78,7 +78,7 @@ describe('forwardGeocode', () => {
limit: 3,
language: 'de',
worldview: 'us',
sessionId: 'abc123',
session_token: 'abc123',

// structured input parameters will be picked
address_line1: '12 main',
Expand All @@ -102,7 +102,7 @@ describe('forwardGeocode', () => {
limit: 3,
language: 'de',
worldview: 'us',
sessionId: 'abc123',
session_token: 'abc123',

address_line1: '12 main',
address_number: '12',
Expand Down Expand Up @@ -145,7 +145,7 @@ describe('reverseGeocode', () => {
language: 'de',
worldview: 'us',
permanent: true,
sessionId: 'abc123'
session_token: 'abc123'
});
expect(tu.requestConfig(geocoding)).toEqual({
method: 'GET',
Expand All @@ -159,7 +159,7 @@ describe('reverseGeocode', () => {
language: 'de',
worldview: 'us',
permanent: 'true',
sessionId: 'abc123'
session_token: 'abc123'
}
});
});
Expand Down
8 changes: 4 additions & 4 deletions services/__tests__/geocoding.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('forwardGeocode', () => {
routing: true,
fuzzyMatch: true,
worldview: 'us',
sessionId: 'abc123'
session_token: 'abc123'
});
expect(tu.requestConfig(geocoding)).toEqual({
method: 'GET',
Expand All @@ -58,7 +58,7 @@ describe('forwardGeocode', () => {
routing: 'true',
fuzzyMatch: 'true',
worldview: 'us',
sessionId: 'abc123'
session_token: 'abc123'
}
});
});
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('reverseGeocode', () => {
reverseMode: 'distance',
routing: true,
worldview: 'us',
sessionId: 'abc123'
session_token: 'abc123'
});
expect(tu.requestConfig(geocoding)).toEqual({
method: 'GET',
Expand All @@ -110,7 +110,7 @@ describe('reverseGeocode', () => {
reverseMode: 'distance',
routing: 'true',
worldview: 'us',
sessionId: 'abc123'
session_token: 'abc123'
}
});
});
Expand Down
8 changes: 4 additions & 4 deletions services/geocoding-v6.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ GeocodingV6.forwardGeocode = function(config) {
worldview: v.string,
autocomplete: v.boolean,
permanent: v.boolean,
sessionId: v.string,
session_token: v.string,

// structured input fields
address_line1: v.string,
Expand Down Expand Up @@ -170,7 +170,7 @@ GeocodingV6.forwardGeocode = function(config) {
'worldview',
'autocomplete',
'permanent',
'sessionId'
'session_token'
])
)
);
Expand Down Expand Up @@ -223,7 +223,7 @@ GeocodingV6.reverseGeocode = function(config) {
language: v.string,
worldview: v.string,
permanent: v.boolean,
sessionId: v.string
session_token: v.string
})(config);

var query = stringifyBooleans(
Expand All @@ -237,7 +237,7 @@ GeocodingV6.reverseGeocode = function(config) {
'language',
'worldview',
'permanent',
'sessionId'
'session_token'
])
)
);
Expand Down
8 changes: 4 additions & 4 deletions services/geocoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Geocoding.forwardGeocode = function(config) {
routing: v.boolean,
fuzzyMatch: v.boolean,
worldview: v.string,
sessionId: v.string
session_token: v.string
})(config);

config.mode = config.mode || 'mapbox.places';
Expand All @@ -123,7 +123,7 @@ Geocoding.forwardGeocode = function(config) {
'routing',
'fuzzyMatch',
'worldview',
'sessionId'
'session_token'
])
)
);
Expand Down Expand Up @@ -179,7 +179,7 @@ Geocoding.reverseGeocode = function(config) {
reverseMode: v.oneOf('distance', 'score'),
routing: v.boolean,
worldview: v.string,
sessionId: v.string
session_token: v.string
})(config);

config.mode = config.mode || 'mapbox.places';
Expand All @@ -196,7 +196,7 @@ Geocoding.reverseGeocode = function(config) {
'reverseMode',
'routing',
'worldview',
'sessionId'
'session_token'
])
)
);
Expand Down

0 comments on commit ae00cc5

Please sign in to comment.