refactor(backend): Changed folder structure for learning content services.
This commit is contained in:
		
							parent
							
								
									18ee991ce3
								
							
						
					
					
						commit
						cc6947dd3c
					
				
					 8 changed files with 13 additions and 13 deletions
				
			
		|  | @ -1,7 +1,7 @@ | ||||||
| import { Request, Response } from 'express'; | import { Request, Response } from 'express'; | ||||||
| import { FALLBACK_LANG } from '../config.js'; | import { FALLBACK_LANG } from '../config.js'; | ||||||
| import {FilteredLearningObject, LearningObjectIdentifier, LearningPathIdentifier} from '../interfaces/learning-content'; | import {FilteredLearningObject, LearningObjectIdentifier, LearningPathIdentifier} from '../interfaces/learning-content'; | ||||||
| import learningObjectService from "../services/learning-content/learning-object-service"; | import learningObjectService from "../services/learning-objects/learning-object-service"; | ||||||
| import {EnvVars, getEnvVar} from "../util/envvars"; | import {EnvVars, getEnvVar} from "../util/envvars"; | ||||||
| import {Language} from "../entities/content/language"; | import {Language} from "../entities/content/language"; | ||||||
| import {BadRequestException} from "../exceptions"; | import {BadRequestException} from "../exceptions"; | ||||||
|  |  | ||||||
|  | @ -1,7 +1,7 @@ | ||||||
| import { Request, Response } from 'express'; | import { Request, Response } from 'express'; | ||||||
| import { themes } from '../data/themes.js'; | import { themes } from '../data/themes.js'; | ||||||
| import { FALLBACK_LANG } from '../config.js'; | import { FALLBACK_LANG } from '../config.js'; | ||||||
| import learningPathService from "../services/learning-content/learning-path-service"; | import learningPathService from "../services/learning-paths/learning-path-service"; | ||||||
| import {NotFoundException} from "../exceptions"; | import {NotFoundException} from "../exceptions"; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  |  | ||||||
|  | @ -1,13 +1,13 @@ | ||||||
| import { DWENGO_API_BASE } from '../../../config.js'; | import { DWENGO_API_BASE } from '../../config.js'; | ||||||
| import { fetchWithLogging } from '../../../util/apiHelper.js'; | import { fetchWithLogging } from '../../util/apiHelper.js'; | ||||||
| import { | import { | ||||||
|     FilteredLearningObject, LearningObjectIdentifier, |     FilteredLearningObject, LearningObjectIdentifier, | ||||||
|     LearningObjectMetadata, |     LearningObjectMetadata, | ||||||
|     LearningObjectNode, LearningPathIdentifier, |     LearningObjectNode, LearningPathIdentifier, | ||||||
|     LearningPathResponse, |     LearningPathResponse, | ||||||
| } from '../../../interfaces/learning-content.js'; | } from '../../interfaces/learning-content.js'; | ||||||
| import dwengoApiLearningPathProvider from './dwengo-api-learning-path-provider.js'; | import dwengoApiLearningPathProvider from '../learning-paths/dwengo-api-learning-path-provider.js'; | ||||||
| import {LearningObjectProvider} from "../learning-object-provider"; | import {LearningObjectProvider} from "./learning-object-provider"; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Helper function to convert the learning object metadata retrieved from the API to a FilteredLearningObject which |  * Helper function to convert the learning object metadata retrieved from the API to a FilteredLearningObject which | ||||||
|  | @ -3,7 +3,7 @@ import { | ||||||
|     LearningObjectIdentifier, |     LearningObjectIdentifier, | ||||||
|     LearningPathIdentifier |     LearningPathIdentifier | ||||||
| } from "../../interfaces/learning-content"; | } from "../../interfaces/learning-content"; | ||||||
| import dwengoApiLearningObjectProvider from "./dwengo-api/dwengo-api-learning-object-provider"; | import dwengoApiLearningObjectProvider from "./dwengo-api-learning-object-provider"; | ||||||
| import {LearningObjectProvider} from "./learning-object-provider"; | import {LearningObjectProvider} from "./learning-object-provider"; | ||||||
| 
 | 
 | ||||||
| function getProvider(id: LearningObjectIdentifier): LearningObjectProvider { | function getProvider(id: LearningObjectIdentifier): LearningObjectProvider { | ||||||
|  | @ -1,10 +1,10 @@ | ||||||
| import { fetchWithLogging } from '../../../util/apiHelper.js'; | import { fetchWithLogging } from '../../util/apiHelper.js'; | ||||||
| import { DWENGO_API_BASE } from '../../../config.js'; | import { DWENGO_API_BASE } from '../../config.js'; | ||||||
| import { | import { | ||||||
|     LearningPath, |     LearningPath, | ||||||
|     LearningPathResponse, |     LearningPathResponse, | ||||||
| } from '../../../interfaces/learning-content.js'; | } from '../../interfaces/learning-content.js'; | ||||||
| import {LearningPathProvider} from "../learning-path-provider"; | import {LearningPathProvider} from "./learning-path-provider"; | ||||||
| 
 | 
 | ||||||
| const dwengoApiLearningPathProvider: LearningPathProvider = { | const dwengoApiLearningPathProvider: LearningPathProvider = { | ||||||
|     async fetchLearningPaths( |     async fetchLearningPaths( | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| import {LearningPath, LearningPathResponse} from "../../interfaces/learning-content"; | import {LearningPath, LearningPathResponse} from "../../interfaces/learning-content"; | ||||||
| import dwengoApiLearningPathProvider from "./dwengo-api/dwengo-api-learning-path-provider"; | import dwengoApiLearningPathProvider from "./dwengo-api-learning-path-provider"; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Service providing access to data about learning paths from the appropriate data source (database or Dwengo-api) |  * Service providing access to data about learning paths from the appropriate data source (database or Dwengo-api) | ||||||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger