cliebt service
This commit is contained in:
parent
f249567baa
commit
7262d03365
@ -30,8 +30,7 @@ async function bootstrap() {
|
|||||||
.setDescription('Unified DCB Payment Aggregation Platform')
|
.setDescription('Unified DCB Payment Aggregation Platform')
|
||||||
.setVersion('1.0.0')
|
.setVersion('1.0.0')
|
||||||
.addBearerAuth()
|
.addBearerAuth()
|
||||||
.addTag('payments')
|
|
||||||
.addTag('subscriptions')
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
const document = SwaggerModule.createDocument(app, config);
|
const document = SwaggerModule.createDocument(app, config);
|
||||||
|
|||||||
@ -85,7 +85,7 @@ export class MerchantController {
|
|||||||
@ApiResponse({ status: 409, description: 'User already attached to merchant' })
|
@ApiResponse({ status: 409, description: 'User already attached to merchant' })
|
||||||
addUserToMerchant(@Body() dto: AddUserToMerchantDto) {
|
addUserToMerchant(@Body() dto: AddUserToMerchantDto) {
|
||||||
return this.merchantService.addUserToMerchant(dto);
|
return this.merchantService.addUserToMerchant(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get(':id/users')
|
@Get(':id/users')
|
||||||
@ApiOperation({ summary: 'Get all users of a merchant' })
|
@ApiOperation({ summary: 'Get all users of a merchant' })
|
||||||
|
|||||||
@ -6,13 +6,13 @@ import { CreateMerchantPartnerDto } from '../dto/create.merchant.dto';
|
|||||||
import { UpdateMerchantPartnerDto } from '../dto/ update.merchant.dto';
|
import { UpdateMerchantPartnerDto } from '../dto/ update.merchant.dto';
|
||||||
import { AddUserToMerchantDto, UpdateUserRoleDto } from '../dto/merchant.user.dto';
|
import { AddUserToMerchantDto, UpdateUserRoleDto } from '../dto/merchant.user.dto';
|
||||||
import { PrismaService } from 'src/shared/services/prisma.service';
|
import { PrismaService } from 'src/shared/services/prisma.service';
|
||||||
|
import { HttpUserServiceClient } from './user.service.client';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MerchantService {
|
export class MerchantService {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly prisma: PrismaService,
|
private readonly prisma: PrismaService,
|
||||||
@Inject()
|
private readonly userServiceClient: HttpUserServiceClient,
|
||||||
private readonly userServiceClient: UserServiceClient,
|
|
||||||
private readonly eventEmitter: EventEmitter2,
|
private readonly eventEmitter: EventEmitter2,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user