Skip to content

Commit a93b59a

Browse files
committed
feat(src): format
1 parent afafb27 commit a93b59a

File tree

10 files changed

+21
-25
lines changed

10 files changed

+21
-25
lines changed

src/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ import { WebhookModule } from './modules/webhook/webhook.module';
125125
CreditCardModule,
126126
HomeLoanModule,
127127
BridgeLoanModule,
128-
WebhookModule
128+
WebhookModule,
129129
],
130130
providers: [
131131
{

src/modules/webhook/dtos/event.webhook.dto.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,5 @@ export class EventDto {
2020

2121
@ApiProperty()
2222
@IsOptional()
23-
metadata: any
23+
metadata: any;
2424
}
25-
26-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { PartialType } from '@nestjs/swagger';
22
import { CreateWebhookDto } from './create.webhook.dto';
33

4-
export class UpdateWebhookDto extends PartialType(CreateWebhookDto) {}
4+
export class UpdateWebhookDto extends PartialType(CreateWebhookDto) {}

src/modules/webhook/entities/webhook.entity.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'typeorm';
1+
import {
2+
Entity,
3+
PrimaryGeneratedColumn,
4+
Column,
5+
CreateDateColumn,
6+
UpdateDateColumn,
7+
} from 'typeorm';
28

39
@Entity()
410
export class Webhook {
5-
611
@PrimaryGeneratedColumn('uuid')
712
id: string;
813

@@ -21,23 +26,23 @@ export class Webhook {
2126
@Column({ nullable: true })
2227
eventData: string;
2328

24-
@Column({ type: 'boolean', default: true, nullable: true })
29+
@Column({ type: 'boolean', default: true, nullable: true })
2530
isActive: boolean;
2631

27-
@Column({ type: 'boolean', default: false, nullable: true })
32+
@Column({ type: 'boolean', default: false, nullable: true })
2833
isDeleted: boolean;
2934

3035
@CreateDateColumn({
3136
type: 'timestamptz',
3237
default: () => 'CURRENT_TIMESTAMP',
33-
nullable: true
38+
nullable: true,
3439
})
3540
createdAt?: Date;
3641

3742
@UpdateDateColumn({
3843
type: 'timestamptz',
3944
default: () => 'CURRENT_TIMESTAMP',
40-
nullable: true
45+
nullable: true,
4146
})
4247
updatedAt?: Date;
4348
}

src/modules/webhook/interfaces/webhook.interfaces.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ export interface IWebhook {
55
statusTransaction: string;
66
eventData: string;
77
}
8-

src/modules/webhook/webhook.controller.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { Test, TestingModule } from '@nestjs/testing';
32
import { WebhookController } from './webhook.controller';
43
import { WebhookService } from './webhook.service';

src/modules/webhook/webhook.controller.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
21
import {
32
Controller,
43
Get,
54
Post,
65
Put,
76
Delete,
87
Param,
9-
Body
8+
Body,
109
} from '@nestjs/common';
1110
import {
1211
ApiTags,
@@ -25,7 +24,7 @@ import { EventDto } from './dtos/event.webhook.dto';
2524
@ApiTags('Webhook')
2625
@Controller('webhook')
2726
export class WebhookController {
28-
constructor(private readonly webhookService: WebhookService) { }
27+
constructor(private readonly webhookService: WebhookService) {}
2928

3029
@SkipJwtAuth()
3130
@Get()
@@ -51,7 +50,7 @@ export class WebhookController {
5150
description: 'The Webhook has been successfully created.',
5251
})
5352
async create(@Body() webhook: CreateWebhookDto): Promise<ResponseDTO> {
54-
return { data: await this.webhookService.create(webhook) }
53+
return { data: await this.webhookService.create(webhook) };
5554
}
5655

5756
@SkipJwtAuth()
@@ -62,7 +61,7 @@ export class WebhookController {
6261
description: 'The Webhook has been successfully created.',
6362
})
6463
async kyc(@Body() webhook: EventDto): Promise<ResponseDTO> {
65-
return { data: await this.webhookService.generate(webhook) }
64+
return { data: await this.webhookService.generate(webhook) };
6665
}
6766

6867
@SkipJwtAuth()
@@ -73,7 +72,7 @@ export class WebhookController {
7372
description: 'The Webhook has been successfully created.',
7473
})
7574
async repayment(@Body() webhook: EventDto): Promise<ResponseDTO> {
76-
return { data: await this.webhookService.generate(webhook) }
75+
return { data: await this.webhookService.generate(webhook) };
7776
}
7877

7978
@SkipJwtAuth()
@@ -84,10 +83,9 @@ export class WebhookController {
8483
description: 'The Webhook has been successfully created.',
8584
})
8685
async loan(@Body() webhook: EventDto): Promise<ResponseDTO> {
87-
return { data: await this.webhookService.generate(webhook) }
86+
return { data: await this.webhookService.generate(webhook) };
8887
}
8988

90-
9189
@SkipJwtAuth()
9290
@Put(':id')
9391
@ApiOperation({ summary: 'Update a Webhook' })

src/modules/webhook/webhook.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { Module } from '@nestjs/common';
32
import { TypeOrmModule } from '@nestjs/typeorm';
43
import { Webhook } from './entities/webhook.entity';

src/modules/webhook/webhook.service.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { Test, TestingModule } from '@nestjs/testing';
32
import { WebhookService } from './webhook.service';
43

src/modules/webhook/webhook.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import { Injectable } from '@nestjs/common';
32
import { CrudService } from '../../common/services/crud/crud.service';
43
import { InjectRepository } from '@nestjs/typeorm';
@@ -16,6 +15,6 @@ export class WebhookService extends CrudService<Webhook> {
1615
}
1716

1817
async generate(event: EventDto) {
19-
return { message: "success" }
18+
return { message: 'success' };
2019
}
2120
}

0 commit comments

Comments
 (0)