feat api endpoint

create post info endpoint
This commit is contained in:
cv
2021-10-27 22:51:22 +02:00
parent 218c94ebd6
commit b2a1974a84
2 changed files with 38 additions and 1 deletions
+4
View File
@@ -6,6 +6,7 @@ import {
dbDownload,
dbUpload,
getInfo,
postInfo,
dbPathToUpload,
} from '../controllers/ontimeController.js';
@@ -18,5 +19,8 @@ router.post('/db', uploadJson, dbUpload);
// create route between controller and '/ontime/info' endpoint
router.get('/info', uploadJson, getInfo);
// create route between controller and '/ontime/info' endpoint
router.post('/info', postInfo);
// create route between controller and '/ontime/dbpath' endpoint
router.post('/dbpath', dbPathToUpload);