Skip to content

Commit

Permalink
feat: Added subsystems router
Browse files Browse the repository at this point in the history
  • Loading branch information
Nino van Galen committed Apr 21, 2020
1 parent 7564524 commit 521c828
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/lib/routers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@
*/

const apiRoute = require('./home.router');
const userRoute = require('./users.router');
const subsystemsRoute = require('./subsystems.router');
const tagsRoute = require('./tags.router');
const usersRoute = require('./users.router');
const { appendPath, deepmerge } = require('../utils');

const routes = [
apiRoute,
userRoute,
subsystemsRoute,
tagsRoute,
usersRoute,
];

/**
Expand Down
33 changes: 33 additions & 0 deletions backend/lib/routers/subsystems.router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* This file is part of the ALICE Electronic Logbook v2, also known as Jiskefet.
* Copyright (C) 2020 Stichting Hogeschool van Amsterdam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

const { SubsystemController } = require('../controllers');

module.exports = {
method: 'get',
path: 'subsystems',
controller: SubsystemController.index,
args: { public: true },
children: [
{
method: 'get',
path: '/:id',
controller: SubsystemController.read,
},
],
};

0 comments on commit 521c828

Please sign in to comment.