mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Added more options to "order", in the Recommendations API (#18487)
closes https://github.com/TryGhost/Product/issues/4000
This commit is contained in:
parent
27cec8b909
commit
2391ccc3db
@ -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 {
|
||||
|
@ -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'
|
||||
}
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user