network info

This commit is contained in:
cv
2021-06-13 14:17:55 +02:00
parent f066e974e6
commit 17ddfb535f
7 changed files with 112 additions and 2 deletions
+8 -1
View File
@@ -2,10 +2,17 @@ import express from 'express';
import uploadJson from '../utils/upload.js';
export const router = express.Router();
import { dbDownload, dbUpload } from '../controllers/ontimeController.js';
import {
dbDownload,
dbUpload,
getInfo,
} 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);
// create route between controller and '/ontime/info' endpoint
router.get('/info', uploadJson, getInfo);