mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 22:25:42 +00:00
Admin rule settings, minor issues resolution
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { Body, Controller, Delete, Get, Param, Patch, Put, Post } from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiParam, ApiProperty, ApiResponse } from '@nestjs/swagger';
|
||||
import { ApiTags, ApiOperation, ApiParam, ApiProperty, ApiResponse, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { CurrencyService } from '../currency/currency.service';
|
||||
import { UpsertExchangeRateDto } from './currency.dto';
|
||||
import { IsNumber, IsPositive, IsOptional, IsString } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { PassengerAdmin } from '../../common/passenger-guards';
|
||||
|
||||
class UpdateExchangeRateDto {
|
||||
@ApiProperty({ example: 3.5 }) @Type(() => Number) @IsNumber() @IsPositive() rate: number;
|
||||
@@ -38,6 +39,8 @@ export class CurrencyController {
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
@PassengerAdmin()
|
||||
@ApiBearerAuth('IAM-auth')
|
||||
@ApiOperation({ summary: 'Delete an exchange rate record by ID' })
|
||||
@ApiParam({ name: 'id', description: 'CurrencyExchangeRate UUID' })
|
||||
@ApiResponse({ status: 200, description: 'Rate deleted' })
|
||||
|
||||
Reference in New Issue
Block a user