| | |
| | | import com.tourguide.modules.user.dto.GuideRegistrationResponse; |
| | | import com.tourguide.modules.user.dto.GuideRegistrationSmsRequest; |
| | | import com.tourguide.modules.user.dto.GuideRegistrationSubmitRequest; |
| | | import com.tourguide.modules.user.dto.GuideRegistrationTeamOptionResponse; |
| | | import com.tourguide.modules.user.dto.GuideRegistrationTokenResponse; |
| | | import com.tourguide.modules.user.dto.GuideRegistrationVerifyRequest; |
| | | import com.tourguide.modules.user.dto.SmsCodeResponse; |
| | | import com.tourguide.modules.user.service.GuideRegistrationDocumentStorageService; |
| | | import com.tourguide.modules.user.service.GuideRegistrationService; |
| | | import com.tourguide.modules.user.service.GuideTeamService; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | private final GuideRegistrationService registrationService; |
| | | private final GuideRegistrationDocumentStorageService documentStorageService; |
| | | private final OperationCityService cityService; |
| | | private final GuideTeamService teamService; |
| | | |
| | | public GuideRegistrationController(GuideRegistrationService registrationService, |
| | | GuideRegistrationDocumentStorageService documentStorageService, |
| | | OperationCityService cityService) { |
| | | OperationCityService cityService, |
| | | GuideTeamService teamService) { |
| | | this.registrationService = registrationService; |
| | | this.documentStorageService = documentStorageService; |
| | | this.cityService = cityService; |
| | | this.teamService = teamService; |
| | | } |
| | | |
| | | @PostMapping("/sms-code") |
| | |
| | | return ApiResponse.success(cityService.enabledOptions()); |
| | | } |
| | | |
| | | @GetMapping("/teams") |
| | | public ApiResponse<List<GuideRegistrationTeamOptionResponse>> teams() { |
| | | return ApiResponse.success(teamService.registrationOptions()); |
| | | } |
| | | |
| | | @PostMapping(value = "/documents", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
| | | public ApiResponse<GuideRegistrationDocumentResponse> uploadDocument( |
| | | @RequestHeader("X-Registration-Token") String registrationToken, |