Skip to content

Commit

Permalink
refactor: removing comment lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingcedru committed Nov 27, 2024
1 parent e86cef8 commit 6b0314e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion apps/drec-api/src/pods/device/device.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ export class DeviceController {
@Body() deviceToRegister: NewDeviceDTO,
): Promise<DeviceDTO> {
this.logger.verbose(`With in create`);
console.log(deviceToRegister);
if (role === Role.Admin || role === Role.ApiUser) {
if (deviceToRegister.organizationId) {
this.logger.debug('Line No: 314');
Expand Down
12 changes: 1 addition & 11 deletions apps/drec-api/src/pods/device/dto/new-device.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,10 @@ export class NewDeviceDTO
message:
'Invalid Capacity or energy Storage Capacity, it should be greater than 0',
})
// @Transform(({ value }) => parseFloat(value))
@Transform((value,obj ) => parseFloat(obj.capacity))
capacity: number;

@ApiProperty()
// @Transform((value, obj) => {
// const date = new Date(obj.commissioningDate);
// const now = new Date();
// if (date.getTime() > now.getTime()) {
// throw new BadRequestException(
// 'Commissioning date cannot be in the future',
// );
// }
// return date.getTime();
// })
@IsString()
@IsISO8601({
message:
Expand Down

0 comments on commit 6b0314e

Please sign in to comment.