fix(backend): Undid accidental rename of LearningPath to LearningContent.
This commit is contained in:
parent
e660c185b5
commit
770c5c9879
3 changed files with 9 additions and 9 deletions
|
@ -1,9 +1,9 @@
|
|||
import { fetchWithLogging } from '../../../util/apiHelper.js';
|
||||
import { DWENGO_API_BASE } from '../../../config.js';
|
||||
import {
|
||||
LearningContent,
|
||||
LearningPath,
|
||||
LearningPathResponse,
|
||||
} from '../../../interfaces/learningContent.js';
|
||||
} from '../../../interfaces/learning-content.js';
|
||||
import {LearningPathProvider} from "../learning-path-provider";
|
||||
|
||||
const dwengoApiLearningPathProvider: LearningPathProvider = {
|
||||
|
@ -24,7 +24,7 @@ const dwengoApiLearningPathProvider: LearningPathProvider = {
|
|||
const apiUrl = `${DWENGO_API_BASE}/learningPath/getPathsFromIdList`;
|
||||
const params = { pathIdList: JSON.stringify({ hruids }), language };
|
||||
|
||||
const learningPaths = await fetchWithLogging<LearningContent[]>(
|
||||
const learningPaths = await fetchWithLogging<LearningPath[]>(
|
||||
apiUrl,
|
||||
`Learning paths for ${source}`,
|
||||
params
|
||||
|
@ -49,11 +49,11 @@ const dwengoApiLearningPathProvider: LearningPathProvider = {
|
|||
async searchLearningPaths(
|
||||
query: string,
|
||||
language: string
|
||||
): Promise<LearningContent[]> {
|
||||
): Promise<LearningPath[]> {
|
||||
const apiUrl = `${DWENGO_API_BASE}/learningPath/search`;
|
||||
const params = { all: query, language };
|
||||
|
||||
const searchResults = await fetchWithLogging<LearningContent[]>(
|
||||
const searchResults = await fetchWithLogging<LearningPath[]>(
|
||||
apiUrl,
|
||||
`Search learning paths with query "${query}"`,
|
||||
params
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {LearningContent, LearningPathResponse} from "../../interfaces/learningContent";
|
||||
import {LearningPath, LearningPathResponse} from "../../interfaces/learning-content";
|
||||
|
||||
/**
|
||||
* Generic interface for a service which provides access to learning paths from a data source.
|
||||
|
@ -12,5 +12,5 @@ export interface LearningPathProvider {
|
|||
/**
|
||||
* Search learning paths in the data source using the given search string.
|
||||
*/
|
||||
searchLearningPaths(query: string, language: string): Promise<LearningContent[]>;
|
||||
searchLearningPaths(query: string, language: string): Promise<LearningPath[]>;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {LearningContent, LearningPathResponse} from "../../interfaces/learningContent";
|
||||
import {LearningPath, LearningPathResponse} from "../../interfaces/learning-content";
|
||||
import dwengoApiLearningPathProvider from "./dwengo-api/dwengo-api-learning-path-provider";
|
||||
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@ const learningPathService = {
|
|||
/**
|
||||
* Search learning paths in the data source using the given search string.
|
||||
*/
|
||||
searchLearningPaths(query: string, language: string): Promise<LearningContent[]> {
|
||||
searchLearningPaths(query: string, language: string): Promise<LearningPath[]> {
|
||||
return dwengoApiLearningPathProvider.searchLearningPaths(query, language);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue