Skip to content

Commit

Permalink
feat: use staging endpoints for rts nqs in docker (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegopf authored Apr 16, 2024
1 parent fa2d0a3 commit dd1b0c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/adapter/docker.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ type DockerEndpoints = Exclude<keyof XComponentsAdapter, 'tagging'>;
* @returns The url for the given endpoint.
*/
function resolveEmpathyEndpoint(endpoint: DockerEndpoints, context: Record<string, any>): string {
const { empathyAPIHost, instance } = context;
const { empathyAPIHost } = context;
const endpointHost: string = empathyAPIHost ? empathyAPIHost : 'localhost:8080';
const endpointInstance: string = instance ? instance : 'imdb';
const endpointInstance = 'imdb';
const empathyEndpoints: Record<DockerEndpoints, string> = {
search: `http://${endpointHost}/query/${endpointInstance}/search`,
popularSearches: `http://${endpointHost}/query/${endpointInstance}/empathize`,
recommendations: `http://${endpointHost}/query/${endpointInstance}/topclicked`,
nextQueries: `http://${endpointHost}/nextqueries/${endpointInstance}`,
nextQueries: `https://api.staging.empathy.co/nextqueries/${endpointInstance}`,
querySuggestions: `http://${endpointHost}/query/${endpointInstance}/empathize`,
relatedTags: `http://${endpointHost}/relatedtags/${endpointInstance}`,
relatedTags: `https://api.staging.empathy.co/relatedtags/${endpointInstance}`,
identifierResults: `http://${endpointHost}/query/${endpointInstance}/skusearch`,
semanticQueries: `http://${endpointHost}/semantics-api/search_single/${endpointInstance}`,
experienceControls: `http://${endpointHost}/config/v1/public/configs`
Expand Down
1 change: 0 additions & 1 deletion src/x-components/plugin.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export async function getInstallXOptions(): Promise<InstallXOptions> {
if (process.env.VUE_APP_DEVELOPMENT_DOCKER) {
const { overrideAdapter } = await import('../adapter/docker.adapter');
overrideAdapter(adapter);
(window.initX as SnippetConfig).lang = 'es';
}
return {
adapter,
Expand Down

0 comments on commit dd1b0c3

Please sign in to comment.