Changed search service to call the actual backend

This commit is contained in:
Eraldo Hasanaj
2019-02-01 17:40:24 +01:00
parent 2cbc8adb94
commit c8bc014fc4
5 changed files with 8 additions and 4 deletions

View File

@@ -68,7 +68,7 @@ export function _basicAuthorizationInterceptorFactory(conf: ConfigService) {
{ provide: APP_INITIALIZER, useFactory: _configInitializer, multi: true, deps: [ ConfigService ] },
{ provide: RouterStateSerializer, useClass: CustomSerializer },
{ provide: HTTP_INTERCEPTORS, useFactory: _basicAuthorizationInterceptorFactory, deps: [ConfigService], multi: true },
{ provide: CatSearchService, useClass: CatSearchMockService } // Uncomment if u want to use the CatSearchMockService
// { provide: CatSearchService, useClass: CatSearchMockService } // Uncomment if u want to use the CatSearchMockService
],
bootstrap: [AppComponent]
})

View File

@@ -66,6 +66,7 @@ export class ArticleSearchComponent implements OnInit {
showRecentSearchResults(article: RecentArticleSearch) {
this.searchParams = article.name;
this.createProcessIfDosntExists();
this.search();
}

View File

@@ -8,6 +8,7 @@ import { GetProducts } from 'src/app/core/actions/product.actions';
import { Router } from '@angular/router';
import { ProductMapping } from '../../core/mappings/product.mapping';
import { map, filter } from 'rxjs/operators';
import { CatImageService } from 'cat-service';
@Component({
selector: 'app-search-results',
@@ -22,7 +23,8 @@ export class SearchResultsComponent implements OnInit {
constructor(
private store: Store<AppState>,
private router: Router,
private productMapping: ProductMapping
private productMapping: ProductMapping,
private imageService: CatImageService
) { }
ngOnInit() {

View File

@@ -5,6 +5,7 @@ import { Product } from '../models/product.model';
import { RecentArticleSearch } from '../models/recent-article-search.model';
import {
CatSearchService,
CatImageService,
QueryTokenDTO,
ItemDTO,
PagedApiResponse

View File

@@ -1,7 +1,7 @@
{
"basicAuthorization": {
"client": "",
"password": "",
"client": "eu6YYrF3NB4CtxMTwrgC",
"password": "rf5f9JUzKW7cjwd6vb6YHv2L2knEZ6m4mNsbpLMF",
"endpoints": [
"https://catsearch.paragon-data.de"
]