Skip to content

Commit

Permalink
feat: recentCoursePacks support UserId
Browse files Browse the repository at this point in the history
  • Loading branch information
baboon-king committed May 24, 2024
1 parent 0eb35c6 commit 2853083
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ export class UserProgressController {
return recentCoursePacks;
}

@Get("/recent-course-packs-by-user-id")
async getUserRecentCoursePacksByUserId(
@Query("userId") userId?: string,
@Query("limit") limit?: number,
) {
const recentCoursePacks = await this.userCourseProgressService.getUserRecentCoursePacks(
userId,
limit || 4,
);
return recentCoursePacks;
}

@UseGuards(AuthGuard)
@Put()
async upsert(@User() user: UserEntity, @Body() dto: UpsertUserProgressDto) {
Expand Down

0 comments on commit 2853083

Please sign in to comment.