server recognizes db, read/write is up
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import db, { sql } from '../db';
|
||||
import pool from '../db';
|
||||
import { Express, Router } from 'express';
|
||||
import UserCtl from '../controllers/UserCtl';
|
||||
const router = Router();
|
||||
@@ -13,6 +13,12 @@ export const userRoute = (app: Express) => {
|
||||
res.status(200).send(data);
|
||||
})
|
||||
|
||||
router.post('/', async (req, res) => {
|
||||
const data = req.body;
|
||||
const response = userCtl.post(data);
|
||||
res.status(200).send(response);
|
||||
})
|
||||
|
||||
router.get('/hidden-thing', (req, res) => {
|
||||
res.send('does this route actually work?');
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user