feat: upload file

This commit is contained in:
cv
2021-05-27 23:00:32 +02:00
parent f887817a68
commit e891e7a538
8 changed files with 272 additions and 12 deletions
+4
View File
@@ -1,7 +1,11 @@
import express from 'express';
import uploadJson from '../utils/upload.js';
export const router = express.Router();
import { dbDownload, dbUpload } from '../controllers/ontimeController.js';
// create route between controller and '/ontime/db' endpoint
router.get('/db', dbDownload);
// create route between controller and '/ontime/db' endpoint
router.post('/db', uploadJson, dbUpload);