fix(backend): Merge-conflicten opgelost.
This commit is contained in:
parent
8c387d6811
commit
fb3c37ce5a
8 changed files with 79 additions and 49 deletions
|
@ -3,6 +3,7 @@ import { getAllLearningObjects, getAttachment, getLearningObject, getLearningObj
|
|||
|
||||
import submissionRoutes from './submissions.js';
|
||||
import questionRoutes from './questions.js';
|
||||
import {authenticatedOnly} from "../middleware/auth/checks/auth-checks";
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
|
@ -16,13 +17,13 @@ const router = express.Router();
|
|||
|
||||
// Route 2: list of object data
|
||||
// Example 2: http://localhost:3000/learningObject?full=true&hruid=un_artificiele_intelligentie
|
||||
router.get('/', getAllLearningObjects);
|
||||
router.get('/', authenticatedOnly, getAllLearningObjects);
|
||||
|
||||
// Parameter: hruid of learning object
|
||||
// Query: language
|
||||
// Route to fetch data of one learning object based on its hruid
|
||||
// Example: http://localhost:3000/learningObject/un_ai7
|
||||
router.get('/:hruid', getLearningObject);
|
||||
router.get('/:hruid', authenticatedOnly, getLearningObject);
|
||||
|
||||
router.use('/:hruid/submissions', submissionRoutes);
|
||||
|
||||
|
@ -32,12 +33,12 @@ router.use('/:hruid/:version/questions', questionRoutes);
|
|||
// Query: language, version (optional)
|
||||
// Route to fetch the HTML rendering of one learning object based on its hruid.
|
||||
// Example: http://localhost:3000/learningObject/un_ai7/html
|
||||
router.get('/:hruid/html', getLearningObjectHTML);
|
||||
router.get('/:hruid/html', authenticatedOnly, getLearningObjectHTML);
|
||||
|
||||
// Parameter: hruid of learning object, name of attachment.
|
||||
// Query: language, version (optional).
|
||||
// Route to get the raw data of the attachment for one learning object based on its hruid.
|
||||
// Example: http://localhost:3000/learningObject/u_test/attachment/testimage.png
|
||||
router.get('/:hruid/html/:attachmentName', getAttachment);
|
||||
router.get('/:hruid/html/:attachmentName', authenticatedOnly, getAttachment);
|
||||
|
||||
export default router;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue