forked from Yara724/api
Rework the reports and insurer part
This commit is contained in:
@@ -78,6 +78,7 @@ export class ExpertInsurerController {
|
||||
@ApiQuery({ name: "role", enum: ["claim", "blame"] })
|
||||
@Get("/:expertId")
|
||||
async requestDetail(
|
||||
@CurrentUser() insurer,
|
||||
@Param("expertId") id: string,
|
||||
@Query("role") role: "claim" | "blame",
|
||||
) {
|
||||
@@ -89,7 +90,11 @@ export class ExpertInsurerController {
|
||||
throw new BadRequestException("Invalid role");
|
||||
}
|
||||
|
||||
return await this.expertInsurerService.getAllFilesByExpertAndRole(id, role);
|
||||
return await this.expertInsurerService.getAllFilesByExpertAndRole(
|
||||
id,
|
||||
role,
|
||||
insurer.clientKey,
|
||||
);
|
||||
}
|
||||
|
||||
@ApiBody({
|
||||
@@ -153,6 +158,7 @@ export class ExpertInsurerController {
|
||||
@ApiQuery({ name: "role", enum: ["claim", "blame"] })
|
||||
@Put("/:requestId/rating")
|
||||
async rateExperts(
|
||||
@CurrentUser() insurer,
|
||||
@Param("requestId") requestId: string,
|
||||
@Body() rating: FileRating,
|
||||
@Query("role") role: "claim" | "blame",
|
||||
@@ -165,13 +171,13 @@ export class ExpertInsurerController {
|
||||
requestId,
|
||||
rating,
|
||||
role,
|
||||
insurer.clientKey,
|
||||
);
|
||||
}
|
||||
|
||||
@Get("branches/:insuranceId")
|
||||
@ApiParam({ name: "insuranceId" })
|
||||
async getInsuranceBranches(@Param("insuranceId") insuranceId: string) {
|
||||
console.log("insuranceId", insuranceId);
|
||||
return await this.expertInsurerService.retrieveInsuranceBranches(
|
||||
insuranceId,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user