Moved errors to domain/errors

no-issue

More cleanup to pull files into their appropriate responsibility
This commit is contained in:
Fabien O'Carroll 2021-10-08 12:31:11 +02:00
parent 9bcd25fe5e
commit 35f150bcf4
11 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
const errors = require('../../errors');
const errors = require('../errors');
const ObjectID = require('bson-objectid').default;
const OfferName = require('./OfferName');

View File

@ -1,5 +1,5 @@
const ValueObject = require('./shared/ValueObject');
const InvalidOfferAmount = require('../../errors').InvalidOfferAmount;
const InvalidOfferAmount = require('../errors').InvalidOfferAmount;
/** @extends ValueObject<number> */
class OfferAmount extends ValueObject {}

View File

@ -1,5 +1,5 @@
const ValueObject = require('./shared/ValueObject');
const InvalidOfferCadence = require('../../errors').InvalidOfferCadence;
const InvalidOfferCadence = require('../errors').InvalidOfferCadence;
/**
* @extends ValueObject<'month'|'year'>

View File

@ -1,7 +1,7 @@
const {slugify} = require('@tryghost/string');
const ValueObject = require('./shared/ValueObject');
const InvalidOfferCode = require('../../errors').InvalidOfferCode;
const InvalidOfferCode = require('../errors').InvalidOfferCode;
/** @extends ValueObject<string> */
class OfferCode extends ValueObject {

View File

@ -1,5 +1,5 @@
const ValueObject = require('./shared/ValueObject');
const InvalidOfferCurrency = require('../../errors').InvalidOfferCurrency;
const InvalidOfferCurrency = require('../errors').InvalidOfferCurrency;
/** @extends ValueObject<string> */
class OfferCurrency extends ValueObject {

View File

@ -1,5 +1,5 @@
const ValueObject = require('./shared/ValueObject');
const InvalidOfferDescription = require('../../errors').InvalidOfferDescription;
const InvalidOfferDescription = require('../errors').InvalidOfferDescription;
/** @extends ValueObject<string> */
class OfferDescription extends ValueObject {

View File

@ -1,5 +1,5 @@
const ValueObject = require('./shared/ValueObject');
const InvalidOfferDuration = require('../../errors').InvalidOfferDuration;
const InvalidOfferDuration = require('../errors').InvalidOfferDuration;
/**
* @typedef {object} BasicDuration

View File

@ -1,5 +1,5 @@
const ValueObject = require('./shared/ValueObject');
const InvalidOfferName = require('../../errors').InvalidOfferName;
const InvalidOfferName = require('../errors').InvalidOfferName;
/** @extends ValueObject<string> */
class OfferName extends ValueObject {

View File

@ -1,5 +1,5 @@
const ValueObject = require('./shared/ValueObject');
const InvalidOfferTitle = require('../../errors').InvalidOfferTitle;
const InvalidOfferTitle = require('../errors').InvalidOfferTitle;
/** @extends ValueObject<string> */
class OfferTitle extends ValueObject {

View File

@ -1,5 +1,5 @@
const ValueObject = require('./shared/ValueObject');
const InvalidOfferType = require('../../errors').InvalidOfferType;
const InvalidOfferType = require('../errors').InvalidOfferType;
/** @extends ValueObject<'fixed'|'percent'> */
class OfferType extends ValueObject {