@yimingliao/cms 0.0.70 → 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 -8
- package/dist/server/index.js +3 -3
- 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,11 +2262,9 @@ declare function createPostFindFullAction(ctx: ActionContext): (params: {
|
|
|
2262
2262
|
isActive?: boolean;
|
|
2263
2263
|
topicSlug?: string;
|
|
2264
2264
|
}) => Promise<Result<{
|
|
2265
|
-
post:
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
next: PostListCard | null;
|
|
2269
|
-
};
|
|
2265
|
+
post: PostFull | undefined;
|
|
2266
|
+
prev: PostListCard | undefined;
|
|
2267
|
+
next: PostListCard | undefined;
|
|
2270
2268
|
}>>;
|
|
2271
2269
|
|
|
2272
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,
|
|
@@ -3955,7 +3955,7 @@ function createPostFindFullAction(ctx) {
|
|
|
3955
3955
|
const found = await postQueryRepository.findFull(params);
|
|
3956
3956
|
if (!found) throw ServerError.notFound();
|
|
3957
3957
|
return {
|
|
3958
|
-
data:
|
|
3958
|
+
data: found
|
|
3959
3959
|
};
|
|
3960
3960
|
},
|
|
3961
3961
|
{
|