-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
19 lines (17 loc) · 823 Bytes
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const express = require('express');
const HomeController = require('./src/controllers/HomeController');
const LoginController = require('./src/controllers/LoginController');
const ContactController = require('./src/controllers/ContactController');
const routes = express.Router();
const aws = require('aws-sdk');
const multer = require('multer');
const s3 = new aws.S3();
const multerConfig = require('./src/config/multerConfig');
routes.get('/', HomeController.list);
routes.put('/post',multer(multerConfig).single('file'), HomeController.create);
routes.post('/post', HomeController.update);
routes.delete('/post/:id', HomeController.delete);
routes.post('/login',LoginController.login);
routes.delete('/post/all', HomeController.deleteAll);
routes.post('/sendContact', ContactController.send);
module.exports = routes;