Refactor middleware function names for clarity

This commit is contained in:
faris Aljohari
2024-04-13 17:25:48 +03:00
parent 9e3544756e
commit 120939b470
2 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ export class CheckBuildingTypeMiddleware implements NestMiddleware {
}
// Call function to check if building is a building
await this.checkBuildingIsBuilding(buildingUuid);
await this.checkBuildingIsBuildingType(buildingUuid);
// Call next middleware
next();
@ -42,7 +42,7 @@ export class CheckBuildingTypeMiddleware implements NestMiddleware {
}
}
async checkBuildingIsBuilding(buildingUuid: string) {
async checkBuildingIsBuildingType(buildingUuid: string) {
const buildingData = await this.spaceRepository.findOne({
where: { uuid: buildingUuid },
relations: ['spaceType'],

View File

@ -32,7 +32,7 @@ export class CheckCommunityTypeMiddleware implements NestMiddleware {
}
// Call function to check if community is a building
await this.checkCommunityIsBuilding(communityUuid);
await this.checkCommunityIsCommunityType(communityUuid);
// Call next middleware
next();
@ -42,7 +42,7 @@ export class CheckCommunityTypeMiddleware implements NestMiddleware {
}
}
async checkCommunityIsBuilding(communityUuid: string) {
async checkCommunityIsCommunityType(communityUuid: string) {
const communityData = await this.spaceRepository.findOne({
where: { uuid: communityUuid },
relations: ['spaceType'],