mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 02:36:19 +00:00
Add function to remove circular references and use it in SpaceService
This commit is contained in:
@ -33,6 +33,7 @@ import { TagService } from './tag';
|
||||
import { SpaceModelService } from 'src/space-model/services';
|
||||
import { DisableSpaceCommand } from '../commands';
|
||||
import { GetSpaceDto } from '../dtos/get.space.dto';
|
||||
import { removeCircularReferences } from '@app/common/helper/removeCircularReferences';
|
||||
@Injectable()
|
||||
export class SpaceService {
|
||||
constructor(
|
||||
@ -116,7 +117,7 @@ export class SpaceService {
|
||||
|
||||
return new SuccessResponseDto({
|
||||
statusCode: HttpStatus.CREATED,
|
||||
data: newSpace,
|
||||
data: JSON.parse(JSON.stringify(newSpace, removeCircularReferences())),
|
||||
message: 'Space created successfully',
|
||||
});
|
||||
} catch (error) {
|
||||
|
Reference in New Issue
Block a user