feat(datamart): intial foundation of the datamart setup
this will allow for faster datamart addtions and updates
This commit is contained in:
13
backend/src/datamart/datamart.routes.ts
Normal file
13
backend/src/datamart/datamart.routes.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { Express } from "express";
|
||||
import runQuery from "./getDatamart.route.js";
|
||||
export const setupDatamartRoutes = (baseUrl: string, app: Express) => {
|
||||
//setup all the routes
|
||||
|
||||
app.use(`${baseUrl}/api/datamart`, runQuery);
|
||||
|
||||
app.all("*foo", (_, res) => {
|
||||
res.status(400).json({
|
||||
message: "You have encountered a datamart route that dose not exist",
|
||||
});
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user