fix: consistente naamgeving kebab case

This commit is contained in:
Gabriellvl 2025-03-07 20:04:46 +01:00
parent 3b71c80be6
commit b8db32161f
11 changed files with 21 additions and 21 deletions

View file

@ -3,9 +3,9 @@ import {
getLearningObjectById,
getLearningObjectIdsFromPath,
getLearningObjectsFromPath,
} from '../services/learningObjects.js';
} from '../services/learning-objects.js';
import { FALLBACK_LANG } from '../config.js';
import { FilteredLearningObject } from '../interfaces/learningPath';
import { FilteredLearningObject } from '../interfaces/learning-path';
export async function getAllLearningObjects(
req: Request,

View file

@ -4,7 +4,7 @@ import { FALLBACK_LANG } from '../config.js';
import {
fetchLearningPaths,
searchLearningPaths,
} from '../services/learningPaths.js';
} from '../services/learning-paths.js';
/**
* Fetch learning paths based on query parameters.
*/

View file

@ -1,6 +1,6 @@
import { Request, Response } from 'express';
import { themes } from '../data/themes.js';
import { loadTranslations } from "../util/translationHelper.js";
import { loadTranslations } from "../util/translation-helper.js";
import { FALLBACK_LANG } from '../config.js';
interface Translations {

View file

@ -13,6 +13,15 @@ import { Attachment } from './attachment.entity.js';
import { Teacher } from '../users/teacher.entity.js';
import { LearningObjectRepository } from '../../data/content/learning-object-repository.js';
@Embeddable()
export class ReturnValue {
@Property({ type: 'string' })
callbackUrl!: string;
@Property({ type: 'json' })
callbackSchema!: string;
}
@Entity({ repository: () => LearningObjectRepository })
export class LearningObject {
@PrimaryKey({ type: 'string' })
@ -88,15 +97,6 @@ export class EducationalGoal {
id!: string;
}
@Embeddable()
export class ReturnValue {
@Property({ type: 'string' })
callbackUrl!: string;
@Property({ type: 'json' })
callbackSchema!: string;
}
export enum ContentType {
Markdown = 'text/markdown',
Image = 'image/image',

View file

@ -2,7 +2,7 @@ import express from 'express';
import {
getAllLearningObjects,
getLearningObject,
} from '../controllers/learningObjects.js';
} from '../controllers/learning-objects.js';
const router = express.Router();

View file

@ -1,5 +1,5 @@
import express from 'express';
import { getLearningPaths } from '../controllers/learningPaths.js';
import { getLearningPaths } from '../controllers/learning-paths.js';
const router = express.Router();

View file

@ -1,12 +1,12 @@
import { DWENGO_API_BASE } from '../config.js';
import { fetchWithLogging } from '../util/apiHelper.js';
import { fetchWithLogging } from '../util/api-helper.js';
import {
FilteredLearningObject,
LearningObjectMetadata,
LearningObjectNode,
LearningPathResponse,
} from '../interfaces/learningPath.js';
import { fetchLearningPaths } from './learningPaths.js';
} from '../interfaces/learning-path.js';
import { fetchLearningPaths } from './learning-paths.js';
function filterData(
data: LearningObjectMetadata,

View file

@ -1,9 +1,9 @@
import { fetchWithLogging } from '../util/apiHelper.js';
import { fetchWithLogging } from '../util/api-helper.js';
import { DWENGO_API_BASE } from '../config.js';
import {
LearningPath,
LearningPathResponse,
} from '../interfaces/learningPath.js';
} from '../interfaces/learning-path.js';
export async function fetchLearningPaths(
hruids: string[],

View file

@ -1,7 +1,7 @@
import fs from 'fs';
import path from 'path';
import yaml from 'js-yaml';
import {FALLBACK_LANG} from "../../config";
import { FALLBACK_LANG } from "../config.js";
export function loadTranslations<T>(language: string): T {
try {