1
0
forked from Yara724/api

Added GET branch endpoint for insurer

This commit is contained in:
SepehrYahyaee
2026-02-01 17:27:01 +03:30
parent f3982e7d5d
commit 432d5f9a98
3 changed files with 176 additions and 0 deletions

View File

@@ -168,6 +168,15 @@ export class ExpertInsurerController {
);
}
@Get("branches/:insuranceId")
@ApiParam({ name: "insuranceId" })
async getInsuranceBranches(@Param("insuranceId") insuranceId: string) {
console.log("insuranceId", insuranceId);
return await this.expertInsurerService.retrieveInsuranceBranches(
insuranceId,
);
}
@Post("branches")
@ApiBody({ type: CreateBranchDto })
async addBranch(

View File

@@ -905,4 +905,8 @@ export class ExpertInsurerService {
},
};
}
async retrieveInsuranceBranches(insuranceId: string) {
return await this.branchDbService.findAll(insuranceId);
}
}