diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/auth/presentation/AuthController.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/auth/presentation/AuthController.kt index 1a2cbe99e..1936af73a 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/auth/presentation/AuthController.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/auth/presentation/AuthController.kt @@ -22,37 +22,43 @@ class AuthController( ) { @PostMapping("/student") fun studentSignUp(@RequestBody @Valid webRequest: StudentSignUpWebRequest): ResponseEntity { - authService.studentSignUp(authRequestMapper.studentSignUpWebRequestToDto(webRequest)) + val request = authRequestMapper.studentSignUpWebRequestToDto(webRequest) + authService.studentSignUp(request) return ResponseEntity.status(HttpStatus.CREATED).build() } @PostMapping("/teacher") fun teacherSignUp(@RequestBody @Valid webRequest: TeacherSignUpWebRequest): ResponseEntity { - authService.teacherSignUp(authRequestMapper.teacherSignUpWebRequestToDto(webRequest)) + val request = authRequestMapper.teacherSignUpWebRequestToDto(webRequest) + authService.teacherSignUp(request) return ResponseEntity.status(HttpStatus.CREATED).build() } @PostMapping("/professor") fun professorSignUp(@RequestBody @Valid webRequest: ProfessorSignUpWebRequest): ResponseEntity { - authService.professorSignUp(authRequestMapper.professorSignUpWebRequestToDto(webRequest)) + val request = authRequestMapper.professorSignUpWebRequestToDto(webRequest) + authService.professorSignUp(request) return ResponseEntity.status(HttpStatus.CREATED).build() } @PostMapping("/government") fun governmentSignUp(@RequestBody @Valid webRequest: GovernmentSignUpWebRequest): ResponseEntity { - authService.governmentSignUp(authRequestMapper.governmentSignUpWebRequestToDto(webRequest)) + val request = authRequestMapper.governmentSignUpWebRequestToDto(webRequest) + authService.governmentSignUp(request) return ResponseEntity.status(HttpStatus.CREATED).build() } @PostMapping("/company-instructor") fun companyInstructorSignUp(@RequestBody @Valid webRequest: CompanyInstructorSignUpWebRequest): ResponseEntity { - authService.companyInstructorSignUp(authRequestMapper.companyInstructorSignUpWebRequestToDto(webRequest)) + val request = authRequestMapper.companyInstructorSignUpWebRequestToDto(webRequest) + authService.companyInstructorSignUp(request) return ResponseEntity.status(HttpStatus.CREATED).build() } @PostMapping("/login") fun login(@RequestBody @Valid webRequest: LoginWebRequest): ResponseEntity { - val response = authService.login(authRequestMapper.loginWebRequestToDto(webRequest)) + val request = authRequestMapper.loginWebRequestToDto(webRequest) + val response = authService.login(request) return ResponseEntity.ok(response) } diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/lecture/presentation/LectureController.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/lecture/presentation/LectureController.kt index 3347dd038..bc19f9bd1 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/lecture/presentation/LectureController.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/lecture/presentation/LectureController.kt @@ -19,7 +19,8 @@ class LectureController( ) { @PostMapping fun createLecture(@Valid @RequestBody webRequest: CreateLectureWebRequest): ResponseEntity { - lectureService.createLecture(lectureRequestMapper.createLectureWebRequestToDto(webRequest)) + val request = lectureRequestMapper.createLectureWebRequestToDto(webRequest) + lectureService.createLecture(request) return ResponseEntity.status(HttpStatus.CREATED).build() } } \ No newline at end of file diff --git a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt index edd6b7b8b..790f1c647 100644 --- a/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt +++ b/bitgouel-api/src/main/kotlin/team/msg/domain/student/presentation/StudentActivityController.kt @@ -19,7 +19,8 @@ class StudentActivityController( ) { @PostMapping fun createStudentActivity(@RequestBody @Valid webRequest: CreateStudentActivityWebRequest): ResponseEntity { - studentActivityService.createStudentActivity(studentActivityMapper.createStudentActivityWebRequestToDto(webRequest)) + val request = studentActivityMapper.createStudentActivityWebRequestToDto(webRequest) + studentActivityService.createStudentActivity(request) return ResponseEntity.status(HttpStatus.CREATED).build() } } \ No newline at end of file