Skip to content

Commit

Permalink
Merge pull request #3398 from microsoft-search/fix/3210
Browse files Browse the repository at this point in the history
Fix/3210
  • Loading branch information
wobba authored Dec 13, 2023
2 parents 32e4b56 + 23352a4 commit e8bdbe6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions search-parts/src/dataSources/MicrosoftSearchDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,9 @@ export class MicrosoftSearchDataSource extends BaseDataSource<IMicrosoftSearchDa
if (propertyPath.localeCompare('dataSourceProperties.useBetaEndpoint') === 0) {

if (newValue) {
this._microsoftSearchUrl = "https://graph.microsoft.com/beta/search/query";
this._microsoftSearchUrl = `${this.context?.pageContext?.legacyPageContext?.msGraphEndpointUrl}/beta/search/query`;
} else {
this._microsoftSearchUrl = "https://graph.microsoft.com/v1.0/search/query";
this._microsoftSearchUrl = `${this.context?.pageContext?.legacyPageContext?.msGraphEndpointUrl}/v1.0/search/query`;
}
}

Expand Down Expand Up @@ -662,9 +662,9 @@ export class MicrosoftSearchDataSource extends BaseDataSource<IMicrosoftSearchDa
this.properties.collapseProperties = this.properties.collapseProperties !== undefined ? this.properties.collapseProperties : [];

if (this.properties.useBetaEndpoint) {
this._microsoftSearchUrl = "https://graph.microsoft.com/beta/search/query";
this._microsoftSearchUrl = `${this.context?.pageContext?.legacyPageContext?.msGraphEndpointUrl}/beta/search/query`;
} else {
this._microsoftSearchUrl = "https://graph.microsoft.com/v1.0/search/query";
this._microsoftSearchUrl = `${this.context?.pageContext?.legacyPageContext?.msGraphEndpointUrl}/v1.0/search/query`;
}
}

Expand Down

0 comments on commit e8bdbe6

Please sign in to comment.