mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
15 lines
389 B
TypeScript
15 lines
389 B
TypeScript
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);
|
|
}
|
|
};
|