1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-06 14:10:06 +00:00

test(client): new route /client + specs added

This commit is contained in:
Saad Jutt
2021-11-03 01:35:52 +05:00
parent d7337ce456
commit d6aeb378de
9 changed files with 201 additions and 30 deletions

View File

@@ -6,6 +6,7 @@ import { InfoJWT } from '../../types'
import driveRouter from './drive'
import stpRouter from './stp'
import userRouter from './user'
import clientRouter from './client'
import authRouter, { connectDB } from './auth'
dotenv.config()
@@ -16,6 +17,7 @@ const router = express.Router()
router.use('/drive', authenticateToken, driveRouter)
router.use('/stp', authenticateToken, stpRouter)
router.use('/user', authenticateToken, verifyAdmin, userRouter)
router.use('/client', authenticateToken, verifyAdmin, clientRouter)
router.use('/auth', authRouter)
function authenticateToken(req: any, res: any, next: any) {