Merge pull request #3 from Cameleonapp/feature/keycloak-config
modification of payload
This commit is contained in:
commit
5d7b628516
@ -1,10 +1,10 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('appConfig', () => ({
|
||||
user: process.env.RABBITMQ_USER,
|
||||
pass: process.env.RABBITMQ_PASS,
|
||||
host: process.env.RABBITMQ_HOST,
|
||||
port: process.env.RABBITMQ_PORT,
|
||||
user: process.env.RABBITMQ_USER || 'user',
|
||||
pass: process.env.RABBITMQ_PASS || 'passer',
|
||||
host: process.env.RABBITMQ_HOST || 'localhost',
|
||||
port: process.env.RABBITMQ_PORT || '5672',
|
||||
apiUrl: process.env.RABBITMQ_API_URL || 'https://rabbitmq.dcb.pixpay.sn/api',
|
||||
queues: {
|
||||
smsmo: process.env.RABBITMQ_QUEUE_WEBHOOK || 'smsmo_queue',
|
||||
|
||||
@ -110,8 +110,8 @@ export class WebhookController {
|
||||
await this.webhookService.handleHeNotification(
|
||||
country,
|
||||
operator,
|
||||
ise,
|
||||
callback,
|
||||
ise,
|
||||
);
|
||||
|
||||
return { status: 'queued' };
|
||||
|
||||
@ -44,6 +44,11 @@ export class InboundSMSMessageNotificationDto {
|
||||
@IsNotEmpty()
|
||||
callbackData: string;
|
||||
|
||||
@ApiProperty({ example: '1' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
partnerId: string;
|
||||
|
||||
@ApiProperty({ type: InboundSMSMessageDto })
|
||||
@ValidateNested()
|
||||
@Type(() => InboundSMSMessageDto)
|
||||
|
||||
@ -48,8 +48,8 @@ export class RabbitMQService implements OnModuleInit {
|
||||
async sendToQueue(queue: string, message: any) {
|
||||
if (!this.channel) throw new Error('RabbitMQ channel not initialized');
|
||||
|
||||
//check if the queue exist and create it if not
|
||||
await this.channel.assertQueue(queue, { durable: true });
|
||||
// //check if the queue exist and create it if not
|
||||
// await this.channel.assertQueue(queue, { durable: true });
|
||||
|
||||
for (let attempt = 1; attempt <= this.maxRetry; attempt++) {
|
||||
try {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user