diff --git a/src/structures/services/structures.service.ts b/src/structures/services/structures.service.ts index 810442b27f6ce6f7a680e6d251b573db512443e2..f43626a2a4ae5a5caa9fd2866fe47722dbbb8d57 100644 --- a/src/structures/services/structures.service.ts +++ b/src/structures/services/structures.service.ts @@ -235,9 +235,9 @@ export class StructuresService { private anonymizeStructure(structure: StructureDocument): StructureDocument { structure.contactPhone = ''; structure.contactMail = ''; - structure.facebook = ''; - structure.twitter = ''; - structure.instagram = ''; + structure.facebook = null; + structure.twitter = null; + structure.instagram = null; structure.website = ''; return structure; } diff --git a/src/structures/structures.controller.ts b/src/structures/structures.controller.ts index c3fb6ef641f799d45b46b427bc9fe26118f73313..6354084b00788cc340b4c4acfba0e4a7d89c056f 100644 --- a/src/structures/structures.controller.ts +++ b/src/structures/structures.controller.ts @@ -89,7 +89,7 @@ export class StructuresController { } @Delete(':id') - @UseGuards(JwtAuthGuard, RolesGuard) + @UseGuards(JwtAuthGuard, IsStructureOwnerGuard) @Roles('admin') @ApiParam({ name: 'id', type: String, required: true }) public async delete(@Param('id') id: string) {