import { JwtAuthGuard } from '@api/modules/auth/user/jwt.guard';
import { Body, Controller, Post, Req, UseGuards } from '@nestjs/common';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { UpsertVideoProgressDto } from './courses-progress.dto';
import { CoursesProgressService } from './courses-progress.service';

@ApiTags('강의 영상 진행율')
@UseGuards(JwtAuthGuard)
@Controller('courses-progress')
export class CoursesProgressController {
  constructor(private coursesProgressService: CoursesProgressService) {}

  @ApiOperation({
    summary: '강의 영상 진행율 저장/수정',
  })
  @Post()
  async upsertVideoProgress(@Body() body: UpsertVideoProgressDto) {
    await this.coursesProgressService.upsertVideoProgress(body);
    return;
  }
}
