@mohasinac/appkit 4.30.9 → 4.30.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -56,13 +56,21 @@ const LISTERS = {
|
|
|
56
56
|
? `${m.filters},categoryType==brand`
|
|
57
57
|
: "categoryType==brand",
|
|
58
58
|
}),
|
|
59
|
-
orders: (m) => orderRepository.listAll(m),
|
|
60
|
-
reviews: (m) => reviewRepository.listAll(m),
|
|
59
|
+
orders: (m, o) => orderRepository.listAll(m, { search: getStringOpt(o, "search") }),
|
|
60
|
+
reviews: (m, o) => reviewRepository.listAll(m, { search: getStringOpt(o, "search") }),
|
|
61
61
|
coupons: (m) => couponsRepository.list(m),
|
|
62
62
|
bids: (m) => bidRepository.list(m),
|
|
63
63
|
payouts: (m) => payoutRepository.list(m),
|
|
64
|
-
blogPosts: (m) => blogRepository.listAll(m),
|
|
65
|
-
events: (m) => eventRepository.list(m),
|
|
64
|
+
blogPosts: (m, o) => blogRepository.listAll(m, { search: getStringOpt(o, "search") }),
|
|
65
|
+
events: (m, o) => eventRepository.list(m, { search: getStringOpt(o, "search") }),
|
|
66
|
+
// 🛑 EVERY lister whose repository accepts a `search` opt MUST forward it.
|
|
67
|
+
// `baseOpts.search` is how token search reaches the repository — Sieve cannot
|
|
68
|
+
// express array-contains, so it can never ride inside `filters`. A lister
|
|
69
|
+
// written `(m) => repo.list(m)` silently drops it and the Function returns an
|
|
70
|
+
// UNFILTERED page with a 200, while the same route's local fallback filters
|
|
71
|
+
// correctly — so it only reproduces in production, and only when the Function
|
|
72
|
+
// is reachable. That is how it survived here for orders, reviews, blogPosts,
|
|
73
|
+
// events and stores after their routes and repositories were both wired.
|
|
66
74
|
// Forwards opts so `baseOpts.search` reaches the repository's token search.
|
|
67
75
|
// This was `(m) => faqsRepository.list(m)` — the second argument was dropped,
|
|
68
76
|
// which made FAQ token search structurally unreachable through the Function
|
|
@@ -82,7 +90,9 @@ const LISTERS = {
|
|
|
82
90
|
productFeatures: (m) => productFeaturesRepository.list(m),
|
|
83
91
|
homepageSections: (m) => homepageSectionsRepository.list(m),
|
|
84
92
|
users: (m) => userRepository.list(m),
|
|
85
|
-
stores: (m, o) => storeRepository.listStores(m, getBoolOpt(o, "activeOnly", true)
|
|
93
|
+
stores: (m, o) => storeRepository.listStores(m, getBoolOpt(o, "activeOnly", true), {
|
|
94
|
+
search: getStringOpt(o, "search"),
|
|
95
|
+
}),
|
|
86
96
|
eventEntries: (m, o) => {
|
|
87
97
|
const eventId = requireOpt(o, "eventId", "eventEntries");
|
|
88
98
|
return eventEntryRepository.listForEvent(eventId, m);
|