initial
This commit is contained in:
12
src/routes/private.ts
Normal file
12
src/routes/private.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import express from 'express';
|
||||
import { Language } from '../langs/lang';
|
||||
import JwtHelper from '../helpers/jwt';
|
||||
|
||||
export class RoutePrivate {
|
||||
static setup(app: express.Application) {
|
||||
|
||||
// app.use(Language.apply)
|
||||
|
||||
JwtHelper.secure(app);
|
||||
}
|
||||
}
|
||||
17
src/routes/public.ts
Normal file
17
src/routes/public.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import express from 'express';
|
||||
import { UserController } from '../controllers/user';
|
||||
import { Language } from '../langs/lang';
|
||||
|
||||
export class RoutePublic {
|
||||
static setup(app: express.Application) {
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user