Compare commits

..

No commits in common. "21645be25cde76456c2cf86f614bf451dcb207a8" and "db5b94e394a8f45f51e44885a63deccccdb7c156" have entirely different histories.

2 changed files with 7 additions and 5 deletions

View File

@ -4,8 +4,8 @@ import databaseLoader from "./database";
import {Application} from "express"; import {Application} from "express";
export default async (app: Application) => { export default async (app: Application) => {
await databaseLoader();
await expressLoader(app); await expressLoader(app);
await routeLoader(app); await routeLoader(app);
databaseLoader();
return app; return app;
}; };

View File

@ -2,12 +2,13 @@ import {Router} from 'express';
import {getConnection} from "typeorm"; import {getConnection} from "typeorm";
import {Track} from "../../models/Track" import {Track} from "../../models/Track"
const router = Router(); var router = Router();
//const manager = getConnection().manager;
router.get('/', async (req, res, next) => { router.get('/', async (req, res, next) => {
const trackManager = await getConnection().getRepository(Track); //let tracks = manager.find(Track);
let tracks = trackManager.count(); //res.send(tracks);
return res.send(tracks); res.sendStatus(200);
}); });
router.post('/', async (req, res, next) => { router.post('/', async (req, res, next) => {
@ -24,4 +25,5 @@ router.post('/', async (req, res, next) => {
}*/ }*/
}); });
export default router; export default router;