refactor(common): Language

This commit is contained in:
Tibo De Peuter 2025-03-31 22:23:25 +02:00
parent 5a90862098
commit bef6c6f75b
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
48 changed files with 71 additions and 56 deletions

View file

@ -1,7 +1,6 @@
import { LearningPathProvider } from './learning-path-provider.js';
import { LearningPath as LearningPathEntity } from '../../entities/content/learning-path.entity.js';
import { getLearningPathRepository } from '../../data/repositories.js';
import { Language } from '../../entities/content/language.js';
import learningObjectService from '../learning-objects/learning-object-service.js';
import { LearningPathNode } from '../../entities/content/learning-path-node.entity.js';
import { LearningPathTransition } from '../../entities/content/learning-path-transition.entity.js';
@ -13,6 +12,7 @@ import {
LearningPathResponse,
Transition,
} from 'dwengo-1-common/src/interfaces/learning-content';
import { Language } from 'dwengo-1-common/src/util/language.js';
/**
* Fetches the corresponding learning object for each of the nodes and creates a map that maps each node to its

View file

@ -1,4 +1,4 @@
import { Language } from '../../entities/content/language.js';
import { Language } from 'dwengo-1-common/src/util/language.js';
import { PersonalizationTarget } from './learning-path-personalization-util.js';
import { LearningPath, LearningPathResponse } from 'dwengo-1-common/src/interfaces/learning-content';

View file

@ -1,9 +1,9 @@
import dwengoApiLearningPathProvider from './dwengo-api-learning-path-provider.js';
import databaseLearningPathProvider from './database-learning-path-provider.js';
import { EnvVars, getEnvVar } from '../../util/envvars.js';
import { Language } from '../../entities/content/language.js';
import { PersonalizationTarget } from './learning-path-personalization-util.js';
import { LearningPath, LearningPathResponse } from 'dwengo-1-common/src/interfaces/learning-content';
import { Language } from 'dwengo-1-common/src/util/language.js';
const userContentPrefix = getEnvVar(EnvVars.UserContentPrefix);
const allProviders = [dwengoApiLearningPathProvider, databaseLearningPathProvider];