From 8bffef5ffe3234045dd32f778b7b465cf32928ac Mon Sep 17 00:00:00 2001 From: hbk01 <3243430237@qq.com> Date: Sun, 13 Oct 2024 22:56:22 +0800 Subject: [PATCH] feat: add /api/sample route --- src/models/sample.js | 2 +- src/router.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/models/sample.js b/src/models/sample.js index 6fcbfb3..6109f65 100644 --- a/src/models/sample.js +++ b/src/models/sample.js @@ -9,7 +9,7 @@ const sampleSchema = new Schema({ // 批次号字符串 L414-5KR-7-240703 batchString: { type: String }, - // 样品 ID 01 + // 样品 ID L414-5KR-7-240703-01 id: { type: String }, // 送样时间 diff --git a/src/router.js b/src/router.js index b5b98c6..a44bcc6 100644 --- a/src/router.js +++ b/src/router.js @@ -1,10 +1,12 @@ import express from "express" import user from "./controllers/user.js" +import sample from "./controllers/sample.js" const router = express.Router({ caseSensitive: true }) router.use("/user", user) +router.use("/sample", sample) export default router \ No newline at end of file