fix: remove access type from document

This commit is contained in:
Abdalhamid Alhamad
2024-12-02 12:13:03 +03:00
parent 847c078735
commit 2bf9dea771
13 changed files with 12 additions and 63 deletions

View File

@ -1,4 +1,4 @@
import { Injectable, NotFoundException } from '@nestjs/common';
import { Injectable } from '@nestjs/common';
import { UploadDocumentRequestDto } from '../dtos/request';
import { DocumentRepository } from '../repositories';
import { OciService } from './oci.service';
@ -8,17 +8,6 @@ export class DocumentService {
constructor(private readonly ociService: OciService, private readonly documentRepository: DocumentRepository) {}
async createDocument(file: Express.Multer.File, uploadedDocumentRequest: UploadDocumentRequestDto) {
const uploadedFile = await this.ociService.uploadFile(file, uploadedDocumentRequest);
console.log('test');
return this.documentRepository.createDocument(uploadedFile);
}
async findDocumentById(documentId: string) {
const document = await this.documentRepository.findDocumentById(documentId);
if (!document) {
throw new NotFoundException('DOCUMENT.NOT_FOUND');
}
return document;
}
}