diff --git a/controller/serialPort.js b/controller/serialPort.js index 0bf87fd..4963f15 100644 --- a/controller/serialPort.js +++ b/controller/serialPort.js @@ -1,11 +1,8 @@ import { Router } from 'express'; -import serialPort from '../services/serialPortService.js'; import serialPortList from '../services/serialPortService.js'; const router = new Router() router.get('/open/:id', serialPortList); -// router.get('/list/:id', serialPortList); -// router.get('/open/:id', serialPort); export default router \ No newline at end of file diff --git a/services/serialPortService.js b/services/serialPortService.js index caff0cf..c9eb386 100644 --- a/services/serialPortService.js +++ b/services/serialPortService.js @@ -1,10 +1,6 @@ import { SerialPort } from 'serialport' -import res from "express/lib/response.js"; import { autoDetect } from '@serialport/bindings-cpp' - - - async function serialPortList(req, res) { SerialPort.list()