Merge branch 'feat/service-layer' into feat/service-layer-adriaan
# Conflicts: # backend/src/controllers/classes.ts # backend/src/controllers/students.ts # backend/src/data/users/teacher-repository.ts # backend/src/interfaces/assignment.ts # backend/src/interfaces/teacher.ts # backend/src/routes/classes.ts # backend/src/services/assignments.ts # backend/src/services/class.ts # backend/src/services/students.ts # backend/src/util/translation-helper.ts
This commit is contained in:
commit
6c4ea0eefb
33 changed files with 454 additions and 137 deletions
18
backend/src/routes/groups.ts
Normal file
18
backend/src/routes/groups.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import express from 'express'
|
||||
import { getAllGroupsHandler, getGroupHandler } from '../controllers/groups.js';
|
||||
const router = express.Router({ mergeParams: true });
|
||||
|
||||
// root endpoint used to search objects
|
||||
router.get('/', getAllGroupsHandler);
|
||||
|
||||
// information about a group (members, ... [TODO DOC])
|
||||
router.get('/:groupid', getGroupHandler);
|
||||
|
||||
// the list of questions a group has made
|
||||
router.get('/:id/question', (req, res) => {
|
||||
res.json({
|
||||
questions: [ '0' ],
|
||||
});
|
||||
})
|
||||
|
||||
export default router
|
Loading…
Add table
Add a link
Reference in a new issue