mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-14 18:05:48 +00:00
Refactor middleware function names for clarity
This commit is contained in:
@ -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'],
|
||||
|
@ -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'],
|
||||
|
Reference in New Issue
Block a user