feat(backend): Controller en route voor het aanmaken van leerobjecten aangemaakt.
This commit is contained in:
parent
86ba4ea11e
commit
78353d6b65
6 changed files with 81 additions and 6 deletions
|
@ -1,8 +1,15 @@
|
|||
import express from 'express';
|
||||
import { getAllLearningObjects, getAttachment, getLearningObject, getLearningObjectHTML } from '../controllers/learning-objects.js';
|
||||
import {
|
||||
getAllLearningObjects,
|
||||
getAttachment,
|
||||
getLearningObject,
|
||||
getLearningObjectHTML,
|
||||
handlePostLearningObject
|
||||
} from '../controllers/learning-objects.js';
|
||||
|
||||
import submissionRoutes from './submissions.js';
|
||||
import questionRoutes from './questions.js';
|
||||
import fileUpload from "express-fileupload";
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
|
@ -18,6 +25,8 @@ const router = express.Router();
|
|||
// Example 2: http://localhost:3000/learningObject?full=true&hruid=un_artificiele_intelligentie
|
||||
router.get('/', getAllLearningObjects);
|
||||
|
||||
router.post('/', fileUpload({useTempFiles: true}), handlePostLearningObject)
|
||||
|
||||
// Parameter: hruid of learning object
|
||||
// Query: language
|
||||
// Route to fetch data of one learning object based on its hruid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue