[feat] Enable deletion of custom fields in workspace (#4780)

**Context**
cf. feature request
[#4597](https://github.com/twentyhq/twenty/issues/4597)
Enables deletion of custom fields that aren't active nor of type
relation

Also 
1. renamed a misnamed file
2. deleted redundant hook BeforeDeleteOneField as it seemed best to move
the logic to the resolver instead

**How was it tested?**
Did not write unit tests as code is to be migrated (discussed with
@Weiko).
Locally tested.

---------

Co-authored-by: Marie Stoppa <mariestoppa@MacBook-Pro-de-Marie.local>
This commit is contained in:
Marie
2024-04-03 17:17:23 +02:00
committed by GitHub
parent 358269c60e
commit ff6abacc86
8 changed files with 132 additions and 62 deletions

View File

@ -61,7 +61,7 @@ import { UpdateFieldInput } from './dtos/update-field.input';
one: { disabled: true },
many: { disabled: true },
},
delete: { many: { disabled: true } },
delete: { disabled: true },
guards: [JwtAuthGuard],
},
],