fix bug where marketplace search is not functioning

test
Chris Veilleux 2022-10-18 14:20:14 -05:00
parent 886f4ee640
commit fdc2a5ceb6
2 changed files with 3 additions and 4 deletions

View File

@ -61,7 +61,6 @@ export class SkillSummaryComponent implements OnInit {
/** Change the view to display only those matching the search criteria. */
showSearchResults(searchResults): void {
this.availableSkills = searchResults;
this.skillsService.availableSkills = searchResults;
this.skillCategories = this.skillsService.getSkillCategories();
}

View File

@ -133,10 +133,10 @@ export class SkillsService {
*
* @param searchTerm string used to search skills
*/
searchSkills(searchTerm: string): Observable<AvailableSkill[]> {
searchSkills(searchTerm: string): Observable<AvailableSkills> {
this.isFiltered.next(!!searchTerm);
return this.http.get<AvailableSkill[]>(
availableSkillsUrl + searchQuery + searchTerm
return this.http.get<AvailableSkills>(availableSkillsUrl + searchQuery + searchTerm).pipe(
tap((response) => { this.availableSkills = response.skills; })
);
}
}