mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
refactor(nestjs): attachments and s3 modules
This commit is contained in:
14
packages/server-nest/src/modules/Attachments/_utils.ts
Normal file
14
packages/server-nest/src/modules/Attachments/_utils.ts
Normal 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);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user