Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions __tests__/schema/autocompletes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ describe('query autocompleteLocation', () => {
.get('/search/geocode/v6/forward')
.query({
q: 'new york',
types: 'country,place',
types: 'country,region,place',
limit: 5,
access_token: process.env.MAPBOX_ACCESS_TOKEN,
})
Expand Down Expand Up @@ -506,7 +506,7 @@ describe('query autocompleteLocation', () => {
.get('/search/geocode/v6/forward')
.query({
q: 'united states',
types: 'country,place',
types: 'country,region,place',
limit: 5,
access_token: process.env.MAPBOX_ACCESS_TOKEN,
})
Expand Down Expand Up @@ -611,7 +611,7 @@ describe('query autocompleteLocation', () => {
.get('/search/geocode/v6/forward')
.query({
q: 'san',
types: 'country,place',
types: 'country,region,place',
limit: 5,
access_token: process.env.MAPBOX_ACCESS_TOKEN,
})
Expand Down Expand Up @@ -647,7 +647,7 @@ describe('query autocompleteLocation', () => {
.get('/search/geocode/v6/forward')
.query({
q: 'test',
types: 'country,place',
types: 'country,region,place',
limit: 5,
access_token: process.env.MAPBOX_ACCESS_TOKEN,
})
Expand Down Expand Up @@ -676,7 +676,7 @@ describe('query autocompleteLocation', () => {
.get('/search/geocode/v6/forward')
.query({
q: 'nonexistentlocation',
types: 'country,place',
types: 'country,region,place',
limit: 5,
access_token: process.env.MAPBOX_ACCESS_TOKEN,
})
Expand All @@ -698,7 +698,7 @@ describe('query autocompleteLocation', () => {
.get('/search/geocode/v6/forward')
.query({
q: 'test',
types: 'country,place',
types: 'country,region,place',
limit: 5,
access_token: process.env.MAPBOX_ACCESS_TOKEN,
})
Expand Down Expand Up @@ -757,7 +757,7 @@ describe('query autocompleteLocation', () => {
.get('/search/geocode/v6/forward')
.query({
q: 'berlin',
types: 'country,place',
types: 'country,region,place',
limit: 5,
access_token: process.env.MAPBOX_ACCESS_TOKEN,
})
Expand Down Expand Up @@ -794,7 +794,7 @@ describe('query autocompleteLocation', () => {
.get('/search/geocode/v6/forward')
.query({
q: 'San Francisco, CA',
types: 'country,place',
types: 'country,region,place',
limit: 5,
access_token: process.env.MAPBOX_ACCESS_TOKEN,
})
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/mapbox/clients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class MapboxClient implements IMapboxClient {

async autocomplete(query: string): Promise<MapboxResponse> {
return this.garmr.execute(async () => {
const url = `${this.baseUrl}?q=${encodeURIComponent(query)}&types=country,place&limit=5&access_token=${this.accessToken}`;
const url = `${this.baseUrl}?q=${encodeURIComponent(query)}&types=country,region,place&limit=5&access_token=${this.accessToken}`;

const response = await fetch(url);

Expand Down
Loading