fix: format + lint
This commit is contained in:
parent
308661d72b
commit
e762621287
5 changed files with 87 additions and 39 deletions
|
@ -45,14 +45,17 @@ export async function fetchLearningPaths(
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
export async function searchLearningPaths(
|
||||
query: string,
|
||||
language: string
|
||||
): Promise<LearningPath[]> {
|
||||
): Promise<LearningPath[]> {
|
||||
const apiUrl = `${DWENGO_API_BASE}/learningPath/search`;
|
||||
const params = { all: query, language };
|
||||
|
||||
const searchResults = await fetchWithLogging<LearningPath[]>(apiUrl, `Search learning paths with query "${query}"`, params);
|
||||
const searchResults = await fetchWithLogging<LearningPath[]>(
|
||||
apiUrl,
|
||||
`Search learning paths with query "${query}"`,
|
||||
params
|
||||
);
|
||||
return searchResults ?? [];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue