parent
b5eafd0a96
commit
57db5860e3
@ -0,0 +1,14 @@
|
||||
import { Request, Response } from 'express';
|
||||
import fooService from '../services/foo.service';
|
||||
|
||||
function getFoo(req: Request, res: Response) {
|
||||
res.json({
|
||||
foo: true,
|
||||
msg: fooService.getFooDetails(),
|
||||
data: req.body,
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
getFoo,
|
||||
};
|
@ -0,0 +1,8 @@
|
||||
import { Router } from 'express';
|
||||
import fooController from './controllers/foo.controller';
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.get('/foo', fooController.getFoo);
|
||||
|
||||
export default { router };
|
@ -0,0 +1,7 @@
|
||||
function getFooDetails() {
|
||||
return 'foo';
|
||||
}
|
||||
|
||||
export default {
|
||||
getFooDetails,
|
||||
};
|
Loading…
Reference in new issue