This commit is contained in:
Li1304553726 2025-02-27 10:23:06 +08:00
commit e9514793e2
2 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import PostList from "@web/src/components/models/course/list/PostList";
import { useAuth } from "@web/src/providers/auth-provider"; import { useAuth } from "@web/src/providers/auth-provider";
import { useMainContext } from "../layout/MainProvider"; import { useMainContext } from "../layout/MainProvider";
import CourseCard from "../courses/components/CourseCard"; import CourseCard from "../courses/components/CourseCard";
import { PostType } from "@nice/common";
export default function MyDutyPage() { export default function MyDutyPage() {
const { user } = useAuth(); const { user } = useAuth();
@ -16,6 +17,7 @@ export default function MyDutyPage() {
params={{ params={{
pageSize: 12, pageSize: 12,
where: { where: {
type: PostType.COURSE,
authorId: user.id, authorId: user.id,
...searchCondition, ...searchCondition,
}, },

View File

@ -2,6 +2,7 @@ import PostList from "@web/src/components/models/course/list/PostList";
import { useAuth } from "@web/src/providers/auth-provider"; import { useAuth } from "@web/src/providers/auth-provider";
import { useMainContext } from "../layout/MainProvider"; import { useMainContext } from "../layout/MainProvider";
import CourseCard from "../courses/components/CourseCard"; import CourseCard from "../courses/components/CourseCard";
import { PostType } from "@nice/common";
export default function MyLearningPage() { export default function MyLearningPage() {
const { user } = useAuth(); const { user } = useAuth();
@ -16,6 +17,7 @@ export default function MyLearningPage() {
params={{ params={{
pageSize: 12, pageSize: 12,
where: { where: {
type: PostType.COURSE,
students: { students: {
some: { some: {
id: user?.id, id: user?.id,