transfer chats
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-07-02 23:03:43 +03:30
parent 130618adb5
commit e97908d4c4
7 changed files with 32 additions and 23 deletions
+7 -3
View File
@@ -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);
}
}