Skip to content

Commit

Permalink
chore: remove some console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mala1180 committed Jan 29, 2024
1 parent 3eb6512 commit c70fa38
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
6 changes: 2 additions & 4 deletions auth/src/routes/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ userRouter.route('/').get((req: Request, res: Response): void => {
.then((users: User[]): void => {
res.status(HttpStatusCode.OK).send(users)
})
.catch((err): void => {
console.log(err)
.catch((): void => {
res.send({ error: 'No user found' })
})
})
Expand All @@ -36,8 +35,7 @@ userRouter.route('/').post(async (req: Request, res: Response): Promise<void> =>
.then((): void => {
res.status(HttpStatusCode.CREATED).send({ success: 'User created' })
})
.catch((e): void => {
console.log(e)
.catch((): void => {
res.send({ error: 'User not created' })
})
})
Expand Down
3 changes: 1 addition & 2 deletions domain/src/storage/monitoring/UserRepositoryImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ export class UserRepositoryImpl implements UserRepository {
}
})
})
.catch((err) => {
console.log(err)
.catch((err): void => {
throw err
})
}
Expand Down
1 change: 0 additions & 1 deletion domain/src/utils/DeviceTypeConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { DeviceType } from '../domain/device/core/impl/enum/DeviceType.js'

export class DeviceTypeConverter {
static convertToDeviceType(type: String): DeviceType {
console.log(type)
switch (type.toUpperCase()) {
case 'CAMERA':
return DeviceType.CAMERA
Expand Down
1 change: 0 additions & 1 deletion monitoring/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const mongoConnect = async (): Promise<void> => {
console.log(`Connected to Mongo DB ${dbName} at ${host}`)
})
.catch((err): void => {
console.log(err)
throw err
})
}
Expand Down
6 changes: 2 additions & 4 deletions monitoring/src/routes/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ deviceRouter.route('/cameras').put((req: Request, res: Response): void => {
.then((): void => {
res.status(HttpStatusCode.OK).send({ success: 'Camera correctly updated' })
})
.catch((err): void => {
console.log(err)
.catch((): void => {
res.status(HttpStatusCode.INTERNAL_SERVER_ERROR).send({ error: 'Camera not updated' })
})
})
Expand All @@ -115,8 +114,7 @@ deviceRouter.route('/sensors').put((req: Request, res: Response): void => {
.then((): void => {
res.status(HttpStatusCode.OK).send({ success: 'Sensor correctly updated' })
})
.catch((err): void => {
console.log(err)
.catch((): void => {
res.status(HttpStatusCode.INTERNAL_SERVER_ERROR).send({ error: 'Sensor not updated' })
})
})
Expand Down

0 comments on commit c70fa38

Please sign in to comment.