OTP_EXPIRATION_TIME
This commit is contained in:
@@ -1,18 +1,7 @@
|
||||
import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards } from '@nestjs/common';
|
||||
import { Controller, Get, Param, UseGuards } from '@nestjs/common';
|
||||
import { PaymentMethodService } from '../services/payment-method.service';
|
||||
import { CreatePaymentMethodDto } from '../dto/create-payment-method.dto';
|
||||
import { UpdatePaymentMethodDto } from '../dto/update-payment-method.dto';
|
||||
import {
|
||||
ApiTags,
|
||||
ApiOperation,
|
||||
ApiResponse,
|
||||
ApiCreatedResponse,
|
||||
ApiOkResponse,
|
||||
ApiNotFoundResponse,
|
||||
ApiBody,
|
||||
ApiParam,
|
||||
ApiBearerAuth,
|
||||
} from '@nestjs/swagger';
|
||||
|
||||
import { ApiTags, ApiOperation, ApiOkResponse, ApiNotFoundResponse, ApiParam, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { AdminAuthGuard } from 'src/modules/auth/guards/adminAuth.guard';
|
||||
|
||||
@UseGuards(AdminAuthGuard)
|
||||
@@ -22,14 +11,6 @@ import { AdminAuthGuard } from 'src/modules/auth/guards/adminAuth.guard';
|
||||
export class PaymentMethodController {
|
||||
constructor(private readonly paymentMethodService: PaymentMethodService) {}
|
||||
|
||||
@Post()
|
||||
@ApiOperation({ summary: 'Create a new payment method' })
|
||||
@ApiBody({ type: CreatePaymentMethodDto })
|
||||
@ApiCreatedResponse({ description: 'Payment method created successfully' })
|
||||
create(@Body() createPaymentMethodDto: CreatePaymentMethodDto) {
|
||||
return this.paymentMethodService.create(createPaymentMethodDto);
|
||||
}
|
||||
|
||||
@Get()
|
||||
@ApiOperation({ summary: 'Get all payment methods' })
|
||||
@ApiOkResponse({ description: 'List of all payment methods' })
|
||||
@@ -45,24 +26,4 @@ export class PaymentMethodController {
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.paymentMethodService.findOne(id);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
@ApiOperation({ summary: 'Update a payment method' })
|
||||
@ApiParam({ name: 'id', type: 'string', description: 'Payment method ID' })
|
||||
@ApiBody({ type: UpdatePaymentMethodDto })
|
||||
@ApiOkResponse({ description: 'Payment method updated successfully' })
|
||||
@ApiNotFoundResponse({ description: 'Payment method not found' })
|
||||
update(@Param('id') id: string, @Body() updatePaymentMethodDto: UpdatePaymentMethodDto) {
|
||||
return this.paymentMethodService.update(id, updatePaymentMethodDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
@ApiOperation({ summary: 'Delete a payment method' })
|
||||
@ApiParam({ name: 'id', type: 'string', description: 'Payment method ID' })
|
||||
@ApiOkResponse({ description: 'Payment method deleted successfully' })
|
||||
@ApiNotFoundResponse({ description: 'Payment method not found' })
|
||||
remove(@Param('id') id: string) {
|
||||
return this.paymentMethodService.remove(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user