Compare commits
No commits in common. "21645be25cde76456c2cf86f614bf451dcb207a8" and "db5b94e394a8f45f51e44885a63deccccdb7c156" have entirely different histories.
21645be25c
...
db5b94e394
@ -4,8 +4,8 @@ import databaseLoader from "./database";
|
||||
import {Application} from "express";
|
||||
|
||||
export default async (app: Application) => {
|
||||
await databaseLoader();
|
||||
await expressLoader(app);
|
||||
await routeLoader(app);
|
||||
databaseLoader();
|
||||
return app;
|
||||
};
|
||||
|
@ -2,12 +2,13 @@ import {Router} from 'express';
|
||||
import {getConnection} from "typeorm";
|
||||
import {Track} from "../../models/Track"
|
||||
|
||||
const router = Router();
|
||||
var router = Router();
|
||||
//const manager = getConnection().manager;
|
||||
|
||||
router.get('/', async (req, res, next) => {
|
||||
const trackManager = await getConnection().getRepository(Track);
|
||||
let tracks = trackManager.count();
|
||||
return res.send(tracks);
|
||||
//let tracks = manager.find(Track);
|
||||
//res.send(tracks);
|
||||
res.sendStatus(200);
|
||||
});
|
||||
|
||||
router.post('/', async (req, res, next) => {
|
||||
@ -24,4 +25,5 @@ router.post('/', async (req, res, next) => {
|
||||
}*/
|
||||
|
||||
});
|
||||
|
||||
export default router;
|
Loading…
x
Reference in New Issue
Block a user