fix: lint + format

This commit is contained in:
Gabriellvl 2025-02-28 17:21:03 +01:00
parent ac778981e2
commit acfffda82d
8 changed files with 162 additions and 118 deletions

View file

@ -1,11 +1,11 @@
import express from "express";
import { getAllLearningObjects } from "../controllers/learningObjects.js";
import express from 'express';
import { getAllLearningObjects } from '../controllers/learningObjects.js';
const router = express.Router();
// arg: hruid learningPath
// query: language
// Arg: hruid learningPath
// Query: language
// Route to fetch list of learning objects based on hruid of learning path
router.get("/:hruid", getAllLearningObjects);
router.get('/:hruid', getAllLearningObjects);
export default router;

View file

@ -1,23 +1,28 @@
import express from "express";
import { getLearningPathsFromIds, getLearningPathsByTheme, getAllLearningPaths, searchLearningPaths } from "../controllers/learningPaths.js";
import express from 'express';
import {
getLearningPathsFromIds,
getLearningPathsByTheme,
getAllLearningPaths,
searchLearningPaths,
} from '../controllers/learningPaths.js';
const router = express.Router();
// query: language
// Query: language
// Route to fetch learning paths based on a list of HRUIDs
router.get("/", getLearningPathsFromIds);
router.get('/', getLearningPathsFromIds);
// query: language
// Query: language
// Route to fetch all possible learning paths
router.get("/all", getAllLearningPaths);
router.get('/all', getAllLearningPaths);
// query: language
// Query: language
// Route to fetch learning paths based on a searchterm
router.get("/search", searchLearningPaths);
router.get('/search', searchLearningPaths);
// arg: theme id
// query: language
// Arg: theme id
// Query: language
// Route to fetch learning paths based on a theme
router.get("/theme/:theme", getLearningPathsByTheme);
router.get('/theme/:theme', getLearningPathsByTheme);
export default router;

View file

@ -3,11 +3,11 @@ import { getThemes, getThemeByTitle } from '../controllers/themes.js';
const router = express.Router();
// query: language
// Query: language
// Route to fetch list of {key, title, description, image} themes in their respective language
router.get('/', getThemes);
// arg: theme (key)
// Arg: theme (key)
// Route to fetch list of hruids based on theme
router.get('/:theme', getThemeByTitle);