Skip to content
Snippets Groups Projects
Commit 8413cabd authored by Manjunath Kumar's avatar Manjunath Kumar
Browse files

fetch-document-by-id-review-changes-1

parent 4f8519fa
No related branches found
No related tags found
1 merge request!3fetchdocumentById in dms
......@@ -7,7 +7,6 @@
import {
Injectable,
NotFoundException,
} from '@nestjs/common';
import {
PrismaService,
......@@ -136,12 +135,13 @@ export class DocumentService {
},
);
if (!document) throw new NotFoundException('Document not found');
if (!document) throw new AppException('404', 'Document not found');
try {
// const file = await this.fileNetClient.get(document.document_id);//mock
if (document.source === 'FILENET') {
// Mock behavior: return presigned URL if available, otherwise return file content
// Mock behavior: return presigned URL if available,
// otherwise return file content
const usePresignedUrl = document.document_link !== null;
if (usePresignedUrl) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment