diff --git a/router.go b/router.go index fad3623..1b38a6c 100644 --- a/router.go +++ b/router.go @@ -77,7 +77,7 @@ func registerRouter(r *gin.Engine) { llmGroup := needAuthGroup.Group(("/llm")) llmGroup.GET("/review/opt", handler.OptCourseReviewHandler) - llmGroup.GET("/course/summary/:courseID", handler.GetCourseDetailHandler) + llmGroup.GET("/course/summary/:courseID", handler.GetCourseSummaryHandler) llmGroup.GET("/vectorize/:courseID", handler.VectorizeCourseReviewsHandler) llmGroup.GET("/match", handler.GetMatchCoursesHandler) } diff --git a/service/llm.go b/service/llm.go index 5c2f628..0cfe42b 100644 --- a/service/llm.go +++ b/service/llm.go @@ -52,7 +52,7 @@ func OptCourseReview(courseName string, reviewContent string) (dto.OptCourseRevi func GetCourseSummary(ctx context.Context, courseID int64) (*dto.GetCourseSummaryResponse, error) { courseQuery := repository.NewCourseQuery(dal.GetDBClient()) - coursePOs, err := courseQuery.GetCourse(ctx, repository.WithCourseID(courseID)) + coursePOs, err := courseQuery.GetCourse(ctx, repository.WithID(courseID)) if err != nil || len(coursePOs) == 0 { return nil, err } @@ -120,7 +120,7 @@ func GetCourseSummary(ctx context.Context, courseID int64) (*dto.GetCourseSummar func VectorizeCourseReviews(ctx context.Context, courseID int64) error { courseQuery := repository.NewCourseQuery(dal.GetDBClient()) - coursePOs, err := courseQuery.GetCourse(ctx, repository.WithCourseID(courseID)) + coursePOs, err := courseQuery.GetCourse(ctx, repository.WithID(courseID)) if err != nil || len(coursePOs) == 0 { return err } @@ -204,7 +204,7 @@ func GetMatchCourses(ctx context.Context, description string) ([]model.CourseSum query := repository.NewCourseQuery(dal.GetDBClient()) - coursePOs, err := query.GetCourse(ctx, repository.WithCourseIDs(courseIDs)) + coursePOs, err := query.GetCourse(ctx, repository.WithIDs(courseIDs)) if err != nil { return nil, err }