disabling space

This commit is contained in:
hannathkadher
2024-12-25 16:23:09 +04:00
parent f9fe209076
commit f7b75a630a
12 changed files with 198 additions and 27 deletions

View File

@ -1,4 +1,3 @@
import { CommunityEntity } from '@app/common/modules/community/entities';
import { SpaceEntity } from '@app/common/modules/space/entities';
import { SpaceRepository } from '@app/common/modules/space/repositories';
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
@ -21,16 +20,17 @@ export class ValidationService {
async validateCommunityAndProject(
communityUuid: string,
projectUuid: string,
): Promise<CommunityEntity> {
await this.projectService.findOne(projectUuid);
) {
const project = await this.projectService.findOne(projectUuid);
const community = await this.communityService.getCommunityById({
communityUuid,
projectUuid,
});
return community.data;
return { community: community.data, project: project };
}
async validateSpaceWithinCommunityAndProject(
communityUuid: string,
projectUuid: string,