@yimingliao/cms 0.0.71 → 0.0.72
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.d.ts +6 -6
- package/dist/server/index.js +2 -2
- package/package.json +1 -1
package/dist/server/index.d.ts
CHANGED
|
@@ -652,9 +652,9 @@ declare function createPostQueryRepository(prisma: PrismaClient): {
|
|
|
652
652
|
translations: PostTranslation[];
|
|
653
653
|
}) | null>;
|
|
654
654
|
findFull: ({ isActive, topicSlug, ...rest }: FindParams) => Promise<{
|
|
655
|
-
post: PostFull |
|
|
656
|
-
prev: PostListCard |
|
|
657
|
-
next: PostListCard |
|
|
655
|
+
post: PostFull | undefined;
|
|
656
|
+
prev: PostListCard | undefined;
|
|
657
|
+
next: PostListCard | undefined;
|
|
658
658
|
}>;
|
|
659
659
|
};
|
|
660
660
|
|
|
@@ -2262,9 +2262,9 @@ declare function createPostFindFullAction(ctx: ActionContext): (params: {
|
|
|
2262
2262
|
isActive?: boolean;
|
|
2263
2263
|
topicSlug?: string;
|
|
2264
2264
|
}) => Promise<Result<{
|
|
2265
|
-
post: PostFull |
|
|
2266
|
-
prev: PostListCard |
|
|
2267
|
-
next: PostListCard |
|
|
2265
|
+
post: PostFull | undefined;
|
|
2266
|
+
prev: PostListCard | undefined;
|
|
2267
|
+
next: PostListCard | undefined;
|
|
2268
2268
|
}>>;
|
|
2269
2269
|
|
|
2270
2270
|
declare function createPostFindListCardsAction(ctx: ActionContext): (params: {
|
package/dist/server/index.js
CHANGED
|
@@ -1809,7 +1809,7 @@ function createPostQueryRepository(prisma) {
|
|
|
1809
1809
|
...rest
|
|
1810
1810
|
}) {
|
|
1811
1811
|
const where = buildWhere3(rest);
|
|
1812
|
-
if (!where) return { post:
|
|
1812
|
+
if (!where) return { post: void 0, prev: void 0, next: void 0 };
|
|
1813
1813
|
const baseWhere = {
|
|
1814
1814
|
...where,
|
|
1815
1815
|
// states
|
|
@@ -1821,7 +1821,7 @@ function createPostQueryRepository(prisma) {
|
|
|
1821
1821
|
where: baseWhere,
|
|
1822
1822
|
include: POST_FULL_INCLUDE
|
|
1823
1823
|
});
|
|
1824
|
-
if (!post) return { post:
|
|
1824
|
+
if (!post) return { post: void 0, prev: void 0, next: void 0 };
|
|
1825
1825
|
const next = await prisma.post.findFirst({
|
|
1826
1826
|
where: baseWhere,
|
|
1827
1827
|
orderBy: POST_ORDER_BY,
|