@yimingliao/cms 0.0.73 → 0.0.75
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 -4
- 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,
|
|
@@ -3977,13 +3983,11 @@ function createPostFindFullAction(ctx) {
|
|
|
3977
3983
|
function createPostFindListCardsAction(ctx) {
|
|
3978
3984
|
const {
|
|
3979
3985
|
repositories: { postQueryRepository },
|
|
3980
|
-
middlewares: { authMiddleware },
|
|
3981
3986
|
action: { executeAction }
|
|
3982
3987
|
} = ctx;
|
|
3983
3988
|
return async function postFindFullAction(params) {
|
|
3984
3989
|
return executeAction(
|
|
3985
3990
|
async ({ locale }) => {
|
|
3986
|
-
await authMiddleware.authenticate();
|
|
3987
3991
|
const { items, total } = await postQueryRepository.findListCards({
|
|
3988
3992
|
...params,
|
|
3989
3993
|
locale
|