diff --git a/ghost/offers/lib/errors.js b/ghost/offers/lib/domain/errors/index.js similarity index 100% rename from ghost/offers/lib/errors.js rename to ghost/offers/lib/domain/errors/index.js diff --git a/ghost/offers/lib/domain/models/Offer.js b/ghost/offers/lib/domain/models/Offer.js index d99e97e7a4..fabcd9a926 100644 --- a/ghost/offers/lib/domain/models/Offer.js +++ b/ghost/offers/lib/domain/models/Offer.js @@ -1,4 +1,4 @@ -const errors = require('../../errors'); +const errors = require('../errors'); const ObjectID = require('bson-objectid').default; const OfferName = require('./OfferName'); diff --git a/ghost/offers/lib/domain/models/OfferAmount.js b/ghost/offers/lib/domain/models/OfferAmount.js index ab27802f73..0b5f5591c0 100644 --- a/ghost/offers/lib/domain/models/OfferAmount.js +++ b/ghost/offers/lib/domain/models/OfferAmount.js @@ -1,5 +1,5 @@ const ValueObject = require('./shared/ValueObject'); -const InvalidOfferAmount = require('../../errors').InvalidOfferAmount; +const InvalidOfferAmount = require('../errors').InvalidOfferAmount; /** @extends ValueObject */ class OfferAmount extends ValueObject {} diff --git a/ghost/offers/lib/domain/models/OfferCadence.js b/ghost/offers/lib/domain/models/OfferCadence.js index f0a1a38929..b72c2df61a 100644 --- a/ghost/offers/lib/domain/models/OfferCadence.js +++ b/ghost/offers/lib/domain/models/OfferCadence.js @@ -1,5 +1,5 @@ const ValueObject = require('./shared/ValueObject'); -const InvalidOfferCadence = require('../../errors').InvalidOfferCadence; +const InvalidOfferCadence = require('../errors').InvalidOfferCadence; /** * @extends ValueObject<'month'|'year'> diff --git a/ghost/offers/lib/domain/models/OfferCode.js b/ghost/offers/lib/domain/models/OfferCode.js index 71ee52bc41..3125a4a98c 100644 --- a/ghost/offers/lib/domain/models/OfferCode.js +++ b/ghost/offers/lib/domain/models/OfferCode.js @@ -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 */ class OfferCode extends ValueObject { diff --git a/ghost/offers/lib/domain/models/OfferCurrency.js b/ghost/offers/lib/domain/models/OfferCurrency.js index fd7c1f40ad..562d92711d 100644 --- a/ghost/offers/lib/domain/models/OfferCurrency.js +++ b/ghost/offers/lib/domain/models/OfferCurrency.js @@ -1,5 +1,5 @@ const ValueObject = require('./shared/ValueObject'); -const InvalidOfferCurrency = require('../../errors').InvalidOfferCurrency; +const InvalidOfferCurrency = require('../errors').InvalidOfferCurrency; /** @extends ValueObject */ class OfferCurrency extends ValueObject { diff --git a/ghost/offers/lib/domain/models/OfferDescription.js b/ghost/offers/lib/domain/models/OfferDescription.js index cdfe9a7a3c..4c36dd0043 100644 --- a/ghost/offers/lib/domain/models/OfferDescription.js +++ b/ghost/offers/lib/domain/models/OfferDescription.js @@ -1,5 +1,5 @@ const ValueObject = require('./shared/ValueObject'); -const InvalidOfferDescription = require('../../errors').InvalidOfferDescription; +const InvalidOfferDescription = require('../errors').InvalidOfferDescription; /** @extends ValueObject */ class OfferDescription extends ValueObject { diff --git a/ghost/offers/lib/domain/models/OfferDuration.js b/ghost/offers/lib/domain/models/OfferDuration.js index 660fccdbd4..12a4533a7d 100644 --- a/ghost/offers/lib/domain/models/OfferDuration.js +++ b/ghost/offers/lib/domain/models/OfferDuration.js @@ -1,5 +1,5 @@ const ValueObject = require('./shared/ValueObject'); -const InvalidOfferDuration = require('../../errors').InvalidOfferDuration; +const InvalidOfferDuration = require('../errors').InvalidOfferDuration; /** * @typedef {object} BasicDuration diff --git a/ghost/offers/lib/domain/models/OfferName.js b/ghost/offers/lib/domain/models/OfferName.js index 87991ad89f..7cebe9e209 100644 --- a/ghost/offers/lib/domain/models/OfferName.js +++ b/ghost/offers/lib/domain/models/OfferName.js @@ -1,5 +1,5 @@ const ValueObject = require('./shared/ValueObject'); -const InvalidOfferName = require('../../errors').InvalidOfferName; +const InvalidOfferName = require('../errors').InvalidOfferName; /** @extends ValueObject */ class OfferName extends ValueObject { diff --git a/ghost/offers/lib/domain/models/OfferTitle.js b/ghost/offers/lib/domain/models/OfferTitle.js index 90394aa7d3..870233b381 100644 --- a/ghost/offers/lib/domain/models/OfferTitle.js +++ b/ghost/offers/lib/domain/models/OfferTitle.js @@ -1,5 +1,5 @@ const ValueObject = require('./shared/ValueObject'); -const InvalidOfferTitle = require('../../errors').InvalidOfferTitle; +const InvalidOfferTitle = require('../errors').InvalidOfferTitle; /** @extends ValueObject */ class OfferTitle extends ValueObject { diff --git a/ghost/offers/lib/domain/models/OfferType.js b/ghost/offers/lib/domain/models/OfferType.js index 13d1157f47..c6fd321bd6 100644 --- a/ghost/offers/lib/domain/models/OfferType.js +++ b/ghost/offers/lib/domain/models/OfferType.js @@ -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 {