Skip to content

Commit e3aaeda

Browse files
committed
add nodemon to devdependencies
1 parent ea948dd commit e3aaeda

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "post-rate",
2+
"name": "express-swagger-starter-kit",
33
"version": "1.0.0",
44
"description": "",
55
"main": "index.js",
@@ -40,6 +40,7 @@
4040
"concurrently": "^5.3.0",
4141
"faker": "^5.1.0",
4242
"jest": "^26.6.3",
43+
"nodemon": "^2.0.15",
4344
"sequelize-cli": "^6.2.0",
4445
"ts-jest": "^26.4.4",
4546
"ts-node": "^10.1.0",

src/controllers/userSession.controller.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function get(token: string): Promise<ISessionDetailPayload> {
4040
try {
4141
const session: any = await UserSession.findOne({ where: { token } });
4242
return object.camelize(session);
43-
} catch (err) {
43+
} catch (err: any) {
4444
if (err.message === ErrorType.NO_ROWS_UPDATED_ERROR) {
4545
throw new ForbiddenError('Session not maintained');
4646
}
@@ -58,7 +58,7 @@ export async function remove(token: string): Promise<ISessionDetailPayload> {
5858
try {
5959
const session: any = await UserSession.update({ isActive: false }, { where: { token, isActive: true } });
6060
return object.camelize(session);
61-
} catch (err) {
61+
} catch (err: any) {
6262
if (err.message === ErrorType.NO_ROWS_UPDATED_ERROR) {
6363
throw new ForbiddenError('Session not maintained');
6464
}

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ app.use(json());
1515
app.use(boom());
1616
app.use(morgan('tiny'));
1717
app.use(express.static('public'));
18-
app.use('/swagger', swaggerUi.serve, swaggerUi.setup(undefined, { swaggerOptions: { url: '/swagger.json', } }));
18+
app.use('/docs', swaggerUi.serve, swaggerUi.setup(undefined, { swaggerOptions: { url: '/swagger.json', } }));
1919
app.use('/api/v1', Router);
2020
app.use('/', (req, res) => {
2121
res.send('<a href="/swagger">Swagger API</a>');

0 commit comments

Comments
 (0)