mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 18:56:22 +00:00
fixed issues in fetching orphan community
This commit is contained in:
@ -1,7 +1,6 @@
|
|||||||
import { ApiProperty } from '@nestjs/swagger';
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
import { Type } from 'class-transformer';
|
import { Type } from 'class-transformer';
|
||||||
import {
|
import {
|
||||||
IsArray,
|
|
||||||
IsBoolean,
|
IsBoolean,
|
||||||
IsNotEmpty,
|
IsNotEmpty,
|
||||||
IsNumber,
|
IsNumber,
|
||||||
|
@ -79,7 +79,6 @@ export class SpaceService {
|
|||||||
: null;
|
: null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log('jnkjn', community);
|
|
||||||
const space = queryRunner.manager.create(SpaceEntity, {
|
const space = queryRunner.manager.create(SpaceEntity, {
|
||||||
...addSpaceDto,
|
...addSpaceDto,
|
||||||
spaceModel,
|
spaceModel,
|
||||||
@ -254,7 +253,7 @@ export class SpaceService {
|
|||||||
const orphanSpace = await this.spaceRepository.findOne({
|
const orphanSpace = await this.spaceRepository.findOne({
|
||||||
where: {
|
where: {
|
||||||
community: {
|
community: {
|
||||||
uuid: `${ORPHAN_COMMUNITY_NAME}-${project.name}`,
|
name: `${ORPHAN_COMMUNITY_NAME}-${project.name}`,
|
||||||
},
|
},
|
||||||
spaceName: ORPHAN_SPACE_NAME,
|
spaceName: ORPHAN_SPACE_NAME,
|
||||||
},
|
},
|
||||||
@ -271,7 +270,7 @@ export class SpaceService {
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
throw new HttpException(
|
throw new HttpException(
|
||||||
'An error occurred while deleting the space',
|
`An error occurred while deleting the space ${error.message}`,
|
||||||
HttpStatus.INTERNAL_SERVER_ERROR,
|
HttpStatus.INTERNAL_SERVER_ERROR,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user