refactor(nestjs): attachments and s3 modules

This commit is contained in:
Ahmed Bouhuolia
2025-04-04 20:56:31 +02:00
parent e47ca98171
commit 1ed77dd5ed
28 changed files with 2257 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
import { ServiceError } from '@/exceptions';
import { ERRORS } from './constants';
export const validateLinkModelExists = (LinkModel) => {
if (!LinkModel) {
throw new ServiceError(ERRORS.DOCUMENT_LINK_REF_INVALID);
}
};
export const validateLinkModelEntryExists = (foundLinkModel) => {
if (!foundLinkModel) {
throw new ServiceError(ERRORS.DOCUMENT_LINK_ID_INVALID);
}
};