Refactor controllers to return UUID of added entities

This commit is contained in:
faris Aljohari
2024-05-01 10:34:07 +03:00
parent 229909f959
commit d146cce1bb
10 changed files with 21 additions and 15 deletions

View File

@ -34,10 +34,11 @@ export class CommunityService {
},
});
await this.spaceRepository.save({
const community = await this.spaceRepository.save({
spaceName: addCommunityDto.communityName,
spaceType: { uuid: spaceType.uuid },
});
return community;
} catch (err) {
throw new HttpException(err.message, HttpStatus.INTERNAL_SERVER_ERROR);
}