This commit is contained in:
@@ -219,10 +219,14 @@ export class RequestService {
|
||||
});
|
||||
}
|
||||
|
||||
private async hardDeleteRequest(id: string, em: EntityManager) {
|
||||
await this.chatService.deleteChatsByRefId(id, em);
|
||||
await em.nativeUpdate(Invoice, { requestId: id }, { requestId: null });
|
||||
async hardDeleteRequestAndItems(id: string, em: EntityManager) {
|
||||
await em.nativeDelete(RequestItem, { request: { id } });
|
||||
await em.nativeDelete(Request, { id });
|
||||
}
|
||||
|
||||
private async hardDeleteRequest(id: string, em: EntityManager) {
|
||||
await this.chatService.deleteChatsByRefId(id, em);
|
||||
await em.nativeUpdate(Invoice, { requestId: id }, { requestId: null });
|
||||
await this.hardDeleteRequestAndItems(id, em);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user