forked from Yara724/api
vehicle data added to get single request by expert , also submit in person
This commit is contained in:
@@ -24,7 +24,7 @@ import { ResendRequestDto } from "./dto/resend.dto";
|
||||
@UseGuards(LocalActorAuthGuard, RolesGuard)
|
||||
@Roles(RoleEnum.EXPERT, RoleEnum.FIELD_EXPERT)
|
||||
export class ExpertBlameV2Controller {
|
||||
constructor(private readonly expertBlameService: ExpertBlameService) {}
|
||||
constructor(private readonly expertBlameService: ExpertBlameService) { }
|
||||
|
||||
@Get()
|
||||
async findAll(@CurrentUser() actor: any) {
|
||||
@@ -101,4 +101,22 @@ export class ExpertBlameV2Controller {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Put("reply/inPerson/:id")
|
||||
@ApiParam({ name: "id", description: "Blame case request id" })
|
||||
@ApiBody({ type: SubmitReplyDto })
|
||||
async submitInPerson(
|
||||
@Param("id") id: string,
|
||||
@Body() body: SubmitReplyDto,
|
||||
@CurrentUser() actor: any,
|
||||
) {
|
||||
try {
|
||||
return await this.expertBlameService.submitInPerson(id, actor.sub);
|
||||
} catch (error) {
|
||||
if (error instanceof HttpException) throw error;
|
||||
throw new InternalServerErrorException(
|
||||
error instanceof Error ? error.message : "Failed to submit expert reply for in person",
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user