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
|
### Fixed
|
||||||
|
|
||||||
- only update user fields in update mutation if they changed
|
- only update user fields in update mutation if they changed
|
||||||
|
- form delete
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
|
|||||||
@ -14,15 +14,13 @@ export class FormDeleteService {
|
|||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async delete(id: string): Promise<void> {
|
async delete(id: number): Promise<void> {
|
||||||
await this.submissionRepository.createQueryBuilder('s')
|
await this.submissionRepository.delete({
|
||||||
.delete()
|
form: new FormEntity({ id }),
|
||||||
.where('s.form = :form', { form: id })
|
})
|
||||||
.execute()
|
|
||||||
|
|
||||||
await this.formRepository.createQueryBuilder('f')
|
await this.formRepository.delete({
|
||||||
.delete()
|
id,
|
||||||
.where('f.id = :form', { form: id })
|
})
|
||||||
.execute()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user