mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
15 lines
398 B
TypeScript
15 lines
398 B
TypeScript
import { ServiceError } from '../Items/ServiceError';
|
|
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);
|
|
}
|
|
};
|