This commit is contained in:
2024-11-30 13:25:01 +07:00
parent 3e32e5869e
commit ff45f97a11
6 changed files with 477 additions and 191 deletions

View File

@ -1,5 +1,6 @@
import express from 'express';
import { UserController } from '../controllers/user';
import { BranchController } from '../controllers/branch';
import { ProductController } from '../controllers/product';
import { Language } from '../langs/lang';
export class RoutePublic {
@ -7,11 +8,18 @@ export class RoutePublic {
app.use(Language.apply)
app.get('/api/user/list', UserController.list)
app.get('/api/user/export', UserController.export)
app.post('/api/user/create', UserController.create)
app.put('/api/user/update/:id', UserController.update)
app.delete('/api/user/delete/:id', UserController.delete)
app.put('/api/user/restore/:id', UserController.restore)
app.get('/api/branch/list', BranchController.list)
app.get('/api/branch/export', BranchController.export)
app.post('/api/branch/create', BranchController.create)
app.put('/api/branch/update/:id', BranchController.update)
app.delete('/api/branch/delete/:id', BranchController.delete)
app.put('/api/branch/restore/:id', BranchController.restore)
app.get('/api/product/list', ProductController.list)
app.get('/api/product/export', ProductController.export)
app.post('/api/product/create', ProductController.create)
app.put('/api/product/update/:id', ProductController.update)
app.delete('/api/product/delete/:id', ProductController.delete)
app.put('/api/product/restore/:id', ProductController.restore)
}
}