Skip to content

Commit

Permalink
fix(core-admin): Fix health check route (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
alllenshibu authored Jan 31, 2024
1 parent 4249500 commit 315061e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions apps/core-admin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ app.get('/', (req: Request, res: Response) => {
return res.send('Techno Event Server');
});

app.post('/api/auth/newuser', addNewUserToDatabaseOnRegister);

app.use(jwtCheck);

import router from './routes';
import { decodeUserInfo } from './middlewares/auth0';

app.use('/core', decodeUserInfo, router);

app.get('/health', (req: Request, res: Response) => {
const healthcheck: any = {
resource: 'Techno Event Server',
Expand All @@ -57,6 +48,15 @@ app.get('/health', (req: Request, res: Response) => {
}
});

app.post('/api/auth/newuser', addNewUserToDatabaseOnRegister);

app.use(jwtCheck);

import router from './routes';
import { decodeUserInfo } from './middlewares/auth0';

app.use('/core', decodeUserInfo, router);

app.listen(port, () => {
console.log(`Server is running at http://localhost:${port}`);
});
Expand Down

0 comments on commit 315061e

Please sign in to comment.