hotfix delete document
This commit is contained in:
parent
4faa88a80f
commit
6f90174f5f
@ -47,7 +47,9 @@ export default class DocumentsService extends BaseService {
|
|||||||
* @throws {Error} If document cannot be deleted
|
* @throws {Error} If document cannot be deleted
|
||||||
*/
|
*/
|
||||||
public async delete(uid: string): Promise<Documents> {
|
public async delete(uid: string): Promise<Documents> {
|
||||||
const documentEntity = await this.documentsRepository.findOneByUid(uid, { office_folder_has_customers: true });
|
const documentEntity = await this.documentsRepository.findOneByUid(uid, { files: true });
|
||||||
|
console.log(documentEntity);
|
||||||
|
|
||||||
const document = Document.hydrate<Document>(documentEntity, { strategy: "excludeAll" });
|
const document = Document.hydrate<Document>(documentEntity, { strategy: "excludeAll" });
|
||||||
|
|
||||||
if (document.files && document.files.length !== 0) {
|
if (document.files && document.files.length !== 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user