Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use staging endpoints for rts nqs in docker #479

Merged
merged 2 commits into from
Apr 16, 2024
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
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