Updated Tables
This commit is contained in:
parent
1b650070d7
commit
7db1a3456b
13 changed files with 192 additions and 9 deletions
22
lib/routes/tests-route.js
Normal file
22
lib/routes/tests-route.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
import { Router, json as jsonMiddleware } from "express";
|
||||
import { getTests } from "../database/queries/tests.js";
|
||||
const router = Router();
|
||||
|
||||
const maxSize = 1024 * 1024 * 100; // 100MB
|
||||
|
||||
// Apply Middlewares
|
||||
router.use(jsonMiddleware({limit: maxSize}));
|
||||
|
||||
// Get Routes
|
||||
router.get("/tests", async (req, res) => {
|
||||
const tests = await getTests();
|
||||
res.json(tests);
|
||||
});
|
||||
|
||||
// Post Routes
|
||||
router.post("/update", (req,res)=>{
|
||||
// Update All Tests
|
||||
res.sendStatus(200);
|
||||
});
|
||||
|
||||
export default router;
|
Loading…
Add table
Add a link
Reference in a new issue