inital UI work on AFLOW-40
This commit is contained in:
@ -7,6 +7,7 @@ import testRoute from './test.js';
|
||||
import dashboardRoute from './dashboard.js';
|
||||
import itemsRoute from './items.js';
|
||||
import manage_routes from './manage/index.js';
|
||||
import project_routes from './projects/index.js';
|
||||
|
||||
// Router base is '/'
|
||||
const Router = express.Router({ strict: false });
|
||||
@ -14,11 +15,13 @@ const Router = express.Router({ strict: false });
|
||||
Router.route('/test').get(testRoute.get);
|
||||
Router.route('/items').get(itemsRoute.get);
|
||||
|
||||
Router.route('/:id(\\w{8})').get(skuRoute.get);
|
||||
Router.use('/projects', project_routes); // has to be before skuRoute
|
||||
Router.route('/:id(\\w{8})').get(skuRoute.get); // we should probably deprecate this
|
||||
Router.route('/s/:id').get(skuRouteDash.get);
|
||||
|
||||
Router.use('/manage', manage_routes);
|
||||
|
||||
|
||||
Router.route('/').get(dashboardRoute.get);
|
||||
|
||||
export default Router;
|
||||
|
9
src/routes/frontend/projects/dashboard.ts
Normal file
9
src/routes/frontend/projects/dashboard.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import express, { Request, Response } from 'express';
|
||||
import { prisma, __path, log } from '../../../index.js';
|
||||
|
||||
function get(req: Request, res: Response) {
|
||||
res.render(__path + '/src/frontend/projects/dashboard.eta.html');
|
||||
|
||||
}
|
||||
|
||||
export default { get };
|
11
src/routes/frontend/projects/index.ts
Normal file
11
src/routes/frontend/projects/index.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import express from 'express';
|
||||
|
||||
// Route imports
|
||||
import dashboard from './dashboard.js';
|
||||
|
||||
// Router base is '/manage'
|
||||
const Router = express.Router({ strict: false });
|
||||
|
||||
Router.route('/').get(dashboard.get);
|
||||
|
||||
export default Router;
|
Reference in New Issue
Block a user