@yimingliao/cms 0.0.73 → 0.0.74
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.
- package/dist/server/index.js +8 -2
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -1822,7 +1822,10 @@ function createPostQueryRepository(prisma) {
|
|
|
1822
1822
|
});
|
|
1823
1823
|
if (!post) return { post: void 0, prev: void 0, next: void 0 };
|
|
1824
1824
|
const next = await prisma.post.findFirst({
|
|
1825
|
-
where:
|
|
1825
|
+
where: {
|
|
1826
|
+
...baseWhere,
|
|
1827
|
+
...rest.type !== void 0 ? { type: rest.type } : {}
|
|
1828
|
+
},
|
|
1826
1829
|
orderBy: POST_ORDER_BY,
|
|
1827
1830
|
cursor: { id: post.id },
|
|
1828
1831
|
skip: 1,
|
|
@@ -1834,7 +1837,10 @@ function createPostQueryRepository(prisma) {
|
|
|
1834
1837
|
return { [key]: o[key] === "asc" ? "desc" : "asc" };
|
|
1835
1838
|
});
|
|
1836
1839
|
const prev = await prisma.post.findFirst({
|
|
1837
|
-
where:
|
|
1840
|
+
where: {
|
|
1841
|
+
...baseWhere,
|
|
1842
|
+
...rest.type !== void 0 ? { type: rest.type } : {}
|
|
1843
|
+
},
|
|
1838
1844
|
orderBy: reversedOrder,
|
|
1839
1845
|
cursor: { id: post.id },
|
|
1840
1846
|
skip: 1,
|