diff --git a/apps/api/src/modules/listings/application/index.ts b/apps/api/src/modules/listings/application/index.ts index 5b6416b..70f7e3a 100644 --- a/apps/api/src/modules/listings/application/index.ts +++ b/apps/api/src/modules/listings/application/index.ts @@ -20,5 +20,10 @@ export { GetPendingModerationHandler } from './queries/get-pending-moderation/ge export { GetPriceHistoryQuery } from './queries/get-price-history/get-price-history.query'; export { GetPriceHistoryHandler, type PriceHistoryItem } from './queries/get-price-history/get-price-history.handler'; +// Commands — Feature listing +export { FeatureListingCommand, type FeaturePackage } from './commands/feature-listing/feature-listing.command'; +export { FeatureListingHandler, type FeatureListingResult } from './commands/feature-listing/feature-listing.handler'; + // Event Handlers +export { ActivateFeaturedListingHandler } from './event-handlers/activate-featured-listing.handler'; export { RecordPriceHistoryHandler } from './event-handlers/record-price-history.handler'; diff --git a/apps/api/src/modules/search/infrastructure/services/search-result-mapper.ts b/apps/api/src/modules/search/infrastructure/services/search-result-mapper.ts index 9fdd114..f512de0 100644 --- a/apps/api/src/modules/search/infrastructure/services/search-result-mapper.ts +++ b/apps/api/src/modules/search/infrastructure/services/search-result-mapper.ts @@ -61,5 +61,6 @@ export function mapRowToListingDocument(row: RawListingRow): ListingDocument { saveCount: row.saveCount ?? 0, projectName: row.projectName, amenities: Array.isArray(row.amenities) ? (row.amenities as string[]) : [], + isFeatured: row.featuredUntil && new Date(row.featuredUntil) > new Date() ? 1 : 0, }; }