Final clean up

This commit is contained in:
Nikola Petrov
2024-07-16 15:20:26 +02:00
parent 905ab263de
commit 3ba36e7430
9 changed files with 18 additions and 17 deletions

View File

@@ -1,12 +1,11 @@
import express, { type Request, type Response } from "express";
const router = express.Router();
import checkAuthenticated from '../../miscellaneous/checkAuthenticated';
import mediaRouter from './mediaRouter';
import gameRouter from './gameRouter';
import cashTransactionRouter from './cashTransactionRouter';
const router = express.Router();
router.use('/games', gameRouter);
router.use('/movies', mediaRouter);
router.use('/series', mediaRouter);

View File

@@ -1,7 +1,8 @@
import express from "express";
const router = express.Router();
import cashTransaction from '../../controllers/cashTransactionController';
const router = express.Router();
router.post('/list', cashTransaction.list);
router.post('/', cashTransaction.create);

View File

@@ -1,8 +1,9 @@
import express from "express";
var router = express.Router();
import gameController from '../../controllers/gameController';
import checkAuthenticated from '../../miscellaneous/checkAuthenticated';
const router = express.Router();
router.get('/', gameController.list);
router.post('/', checkAuthenticated, gameController.create);

View File

@@ -2,7 +2,7 @@ import express from "express";
import mediaController from '../../controllers/mediaController.js';
import checkAuthenticated from '../../miscellaneous/checkAuthenticated';
var router = express.Router();
const router = express.Router();
router.get('/', mediaController.list);

View File

@@ -1,8 +1,8 @@
import express, { type Request, type Response } from "express";
const router = express.Router();
import userData from './userKnowledge.json';
const router = express.Router();
/* GET home page. */
router.get('/', function (req: Request, res: Response) {
const project = userData.project;

View File

@@ -1,9 +1,9 @@
import express, { type Request, type Response } from "express";
var router = express.Router();
import userController from '../controllers/userController';
import checkAuthenticated from '../miscellaneous/checkAuthenticated';
const router = express.Router();
/* GET home page. */
router.get('/', function (req: Request, res: Response) {
res.render('user', { title: 'Register' });