refactor(backend): Changed folder structure for learning content services.

This commit is contained in:
Gerald Schmittinger 2025-03-04 22:38:21 +01:00
parent 18ee991ce3
commit cc6947dd3c
8 changed files with 13 additions and 13 deletions

View file

@ -1,7 +1,7 @@
import { Request, Response } from 'express';
import { FALLBACK_LANG } from '../config.js';
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 {Language} from "../entities/content/language";
import {BadRequestException} from "../exceptions";

View file

@ -1,7 +1,7 @@
import { Request, Response } from 'express';
import { themes } from '../data/themes.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";
/**

View file

@ -1,13 +1,13 @@
import { DWENGO_API_BASE } from '../../../config.js';
import { fetchWithLogging } from '../../../util/apiHelper.js';
import { DWENGO_API_BASE } from '../../config.js';
import { fetchWithLogging } from '../../util/apiHelper.js';
import {
FilteredLearningObject, LearningObjectIdentifier,
LearningObjectMetadata,
LearningObjectNode, LearningPathIdentifier,
LearningPathResponse,
} from '../../../interfaces/learning-content.js';
import dwengoApiLearningPathProvider from './dwengo-api-learning-path-provider.js';
import {LearningObjectProvider} from "../learning-object-provider";
} from '../../interfaces/learning-content.js';
import dwengoApiLearningPathProvider from '../learning-paths/dwengo-api-learning-path-provider.js';
import {LearningObjectProvider} from "./learning-object-provider";
/**
* Helper function to convert the learning object metadata retrieved from the API to a FilteredLearningObject which

View file

@ -3,7 +3,7 @@ import {
LearningObjectIdentifier,
LearningPathIdentifier
} 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";
function getProvider(id: LearningObjectIdentifier): LearningObjectProvider {

View file

@ -1,10 +1,10 @@
import { fetchWithLogging } from '../../../util/apiHelper.js';
import { DWENGO_API_BASE } from '../../../config.js';
import { fetchWithLogging } from '../../util/apiHelper.js';
import { DWENGO_API_BASE } from '../../config.js';
import {
LearningPath,
LearningPathResponse,
} from '../../../interfaces/learning-content.js';
import {LearningPathProvider} from "../learning-path-provider";
} from '../../interfaces/learning-content.js';
import {LearningPathProvider} from "./learning-path-provider";
const dwengoApiLearningPathProvider: LearningPathProvider = {
async fetchLearningPaths(

View file

@ -1,5 +1,5 @@
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)