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, getLearningObjectById,
getLearningObjectIdsFromPath, getLearningObjectIdsFromPath,
getLearningObjectsFromPath, getLearningObjectsFromPath,
} from '../services/learningObjects.js'; } from '../services/learning-objects.js';
import { FALLBACK_LANG } from '../config.js'; import { FALLBACK_LANG } from '../config.js';
import { FilteredLearningObject } from '../interfaces/learningPath'; import { FilteredLearningObject } from '../interfaces/learning-path';
export async function getAllLearningObjects( export async function getAllLearningObjects(
req: Request, req: Request,

View file

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

View file

@ -1,6 +1,6 @@
import { Request, Response } from 'express'; import { Request, Response } from 'express';
import { themes } from '../data/themes.js'; 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'; import { FALLBACK_LANG } from '../config.js';
interface Translations { interface Translations {

View file

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

View file

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

View file

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

View file

@ -1,12 +1,12 @@
import { DWENGO_API_BASE } from '../config.js'; import { DWENGO_API_BASE } from '../config.js';
import { fetchWithLogging } from '../util/apiHelper.js'; import { fetchWithLogging } from '../util/api-helper.js';
import { import {
FilteredLearningObject, FilteredLearningObject,
LearningObjectMetadata, LearningObjectMetadata,
LearningObjectNode, LearningObjectNode,
LearningPathResponse, LearningPathResponse,
} from '../interfaces/learningPath.js'; } from '../interfaces/learning-path.js';
import { fetchLearningPaths } from './learningPaths.js'; import { fetchLearningPaths } from './learning-paths.js';
function filterData( function filterData(
data: LearningObjectMetadata, 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 { DWENGO_API_BASE } from '../config.js';
import { import {
LearningPath, LearningPath,
LearningPathResponse, LearningPathResponse,
} from '../interfaces/learningPath.js'; } from '../interfaces/learning-path.js';
export async function fetchLearningPaths( export async function fetchLearningPaths(
hruids: string[], hruids: string[],

View file

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