Skip to content

Commit

Permalink
Added restrict_value
Browse files Browse the repository at this point in the history
Fix service request payload
  • Loading branch information
SamarinDV committed Apr 24, 2020
1 parent 069366a commit bbe736e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .angulardoc.json
@@ -0,0 +1,4 @@
{
"repoId": "b857b096-773a-4ba6-93aa-23a1376c6a93",
"lastSync": 0
}
1 change: 1 addition & 0 deletions projects/ngx-dadata/src/lib/dadata-config.ts
Expand Up @@ -41,6 +41,7 @@ export interface DadataConfig {
locations?: Location[];
locationsBoost?: Location[];
bounds?: Bounds;
restrict_value?: boolean;
}

export const DadataConfigDefault: DadataConfig = {
Expand Down
7 changes: 4 additions & 3 deletions projects/ngx-dadata/src/lib/ngx-dadata.service.ts
Expand Up @@ -38,10 +38,11 @@ export class NgxDadataService {
{},
{query: value},
{count: config?.limit},
{location: config?.locations},
{location_bust: config?.locationsBoost},
{locations: config?.locations},
{location_boost: config?.locationsBoost},
{from_bound: config?.bounds?.fromBound},
{to_bound: config?.bounds?.toBound}
{to_bound: config?.bounds?.toBound},
{restrict_value: config?.restrict_value}
);
return this.http.post<DadataResponse>('https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/' + type, body, httpOptions);
}
Expand Down

0 comments on commit bbe736e

Please sign in to comment.