import { Hono } from 'hono' import { SmsController } from './controllers/sms.ts' import type { MiddlewareHandler } from 'hono' export function createSmsRoutes(withAuth: MiddlewareHandler) { const router = new Hono() // 登录验证 router.post('/login', SmsController.login) // 获取设备状态 router.get('/status', withAuth, SmsController.getDeviceStatus) // 发送短信 router.post('/send', withAuth, SmsController.sendSms) // 查询短信结果 router.get('/result/:id', withAuth, SmsController.getSmsResult) return router }