diff --git a/ghost/recommendations/src/RecommendationController.ts b/ghost/recommendations/src/RecommendationController.ts index bbb6274532..732072ad9b 100644 --- a/ghost/recommendations/src/RecommendationController.ts +++ b/ghost/recommendations/src/RecommendationController.ts @@ -17,9 +17,14 @@ const RecommendationIncludesMap = { }; const RecommendationOrderMap = { + title: 'title' as const, + reason: 'reason' as const, + excerpt: 'excerpt' as const, + one_click_subscribe: 'oneClickSubscribe' as const, + created_at: 'createdAt' as const, + updated_at: 'updatedAt' as const, 'count.clicks': 'clickCount' as const, - 'count.subscribers': 'subscriberCount' as const, - created_at: 'createdAt' as const + 'count.subscribers': 'subscriberCount' as const }; export class RecommendationController { diff --git a/ghost/recommendations/test/RecommendationController.test.ts b/ghost/recommendations/test/RecommendationController.test.ts index 531d105d86..c75715a797 100644 --- a/ghost/recommendations/test/RecommendationController.test.ts +++ b/ghost/recommendations/test/RecommendationController.test.ts @@ -489,7 +489,7 @@ describe('RecommendationController', function () { user: {} }), { - message: 'order.0.field must be one of count.clicks, count.subscribers, created_at' + message: 'order.0.field must be one of title, reason, excerpt, one_click_subscribe, created_at, updated_at, count.clicks, count.subscribers' } ); });