fix form delete
This commit is contained in:
parent
5b717a2963
commit
2d3589e13a
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
### Fixed
|
||||
|
||||
- only update user fields in update mutation if they changed
|
||||
- form delete
|
||||
|
||||
### Security
|
||||
|
||||
|
||||
@ -14,15 +14,13 @@ export class FormDeleteService {
|
||||
) {
|
||||
}
|
||||
|
||||
async delete(id: string): Promise<void> {
|
||||
await this.submissionRepository.createQueryBuilder('s')
|
||||
.delete()
|
||||
.where('s.form = :form', { form: id })
|
||||
.execute()
|
||||
async delete(id: number): Promise<void> {
|
||||
await this.submissionRepository.delete({
|
||||
form: new FormEntity({ id }),
|
||||
})
|
||||
|
||||
await this.formRepository.createQueryBuilder('f')
|
||||
.delete()
|
||||
.where('f.id = :form', { form: id })
|
||||
.execute()
|
||||
await this.formRepository.delete({
|
||||
id,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user