forked from Yara724/api
Added fileMaker and fileReviewer for new flow
This commit is contained in:
@@ -36,6 +36,8 @@ import { CreateBranchDto } from "src/client/dto/create-branch.dto";
|
||||
import {
|
||||
CreateBlameExpertByInsurerDto,
|
||||
CreateClaimExpertByInsurerDto,
|
||||
CreateFileMakerByInsurerDto,
|
||||
CreateFileReviewerByInsurerDto,
|
||||
} from "./dto/create-insurer-expert.dto";
|
||||
|
||||
@Controller("expert-insurer")
|
||||
@@ -142,6 +144,32 @@ export class ExpertInsurerController {
|
||||
return this.expertInsurerService.addClaimExpert(insurer.clientKey, body);
|
||||
}
|
||||
|
||||
@Post("experts/file-maker")
|
||||
@ApiBody({ type: CreateFileMakerByInsurerDto })
|
||||
@ApiOperation({ summary: "Create a FileMaker account under this insurer" })
|
||||
async addFileMaker(
|
||||
@CurrentUser() insurer,
|
||||
@Body() body: CreateFileMakerByInsurerDto,
|
||||
) {
|
||||
if (!insurer) {
|
||||
throw new UnauthorizedException("Could not identify the current user.");
|
||||
}
|
||||
return this.expertInsurerService.addFileMaker(insurer.clientKey, body);
|
||||
}
|
||||
|
||||
@Post("experts/file-reviewer")
|
||||
@ApiBody({ type: CreateFileReviewerByInsurerDto })
|
||||
@ApiOperation({ summary: "Create a FileReviewer account under this insurer" })
|
||||
async addFileReviewer(
|
||||
@CurrentUser() insurer,
|
||||
@Body() body: CreateFileReviewerByInsurerDto,
|
||||
) {
|
||||
if (!insurer) {
|
||||
throw new UnauthorizedException("Could not identify the current user.");
|
||||
}
|
||||
return this.expertInsurerService.addFileReviewer(insurer.clientKey, body);
|
||||
}
|
||||
|
||||
@ApiQuery({ name: "page", type: Number })
|
||||
@ApiQuery({ name: "response_count", type: Number })
|
||||
@Get("experts/list")
|
||||
|
||||
Reference in New Issue
Block a user