forked from Yara724/api
YARA-941
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
LightCondition,
|
||||
} from "src/Types&Enums/blame-request-management/accident-conditions.enum";
|
||||
import { BlameRequestType } from "src/Types&Enums/blame-request-management/blameRequestType.enum";
|
||||
import { IsEnum } from "class-validator";
|
||||
|
||||
export class InitialFormDto {
|
||||
@ApiProperty({ required: false, default: false })
|
||||
@@ -161,16 +162,17 @@ export class LocationDto {
|
||||
lon: number;
|
||||
}
|
||||
|
||||
export class CreateRequestDto {
|
||||
@ApiProperty({ type: String, required: false })
|
||||
type?: "THIRD_PARTY" | "CAR_BODY";
|
||||
}
|
||||
// export class CreateRequestDto {
|
||||
// @ApiProperty({ type: String, required: false })
|
||||
// type?: "THIRD_PARTY" | "CAR_BODY";
|
||||
// }
|
||||
|
||||
/**
|
||||
* V2 create blame request (new model `BlameRequest`).
|
||||
*/
|
||||
export class CreateBlameRequestDtoV2 {
|
||||
@ApiProperty({ enum: BlameRequestType })
|
||||
@IsEnum(BlameRequestType)
|
||||
@ApiProperty({ enum: BlameRequestType, description: "Type of blame request" })
|
||||
type: BlameRequestType;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ import { BlameDocumentType } from "./entities/schema/blame-document.schema";
|
||||
import {
|
||||
CarBodyFormDto,
|
||||
CarBodySecondForm,
|
||||
CreateRequestDto,
|
||||
DescriptionDto,
|
||||
InitialFormDto,
|
||||
LocationDto,
|
||||
@@ -53,18 +52,18 @@ export class RequestManagementController {
|
||||
private readonly requestManagementService: RequestManagementService,
|
||||
) {}
|
||||
|
||||
@ApiOperation({ deprecated: true })
|
||||
@Post()
|
||||
@UseGuards(GlobalGuard)
|
||||
async createRequest(
|
||||
@CurrentUser() user,
|
||||
@Body() createRequestDto: CreateRequestDto,
|
||||
) {
|
||||
return await this.requestManagementService.createRequest(
|
||||
user,
|
||||
createRequestDto.type,
|
||||
);
|
||||
}
|
||||
// @ApiOperation({ deprecated: true })
|
||||
// @Post()
|
||||
// @UseGuards(GlobalGuard)
|
||||
// async createRequest(
|
||||
// @CurrentUser() user,
|
||||
// @Body() createRequestDto: CreateRequestDto,
|
||||
// ) {
|
||||
// return await this.requestManagementService.createRequest(
|
||||
// user,
|
||||
// createRequestDto.type,
|
||||
// );
|
||||
// }
|
||||
|
||||
@ApiOperation({ deprecated: true })
|
||||
@Post("/initial-form/:requestId")
|
||||
|
||||
Reference in New Issue
Block a user