package net.halfbinary.scavengerhuntapi.controller import jakarta.validation.Valid import net.halfbinary.scavengerhuntapi.model.converter.toDomain import net.halfbinary.scavengerhuntapi.model.request.HunterSignupRequest import net.halfbinary.scavengerhuntapi.service.SignupService import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.PostMapping import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RestController @RestController class SignupController(private val signupService: SignupService) { @PostMapping("/signup") fun hunterSignup(@Valid @RequestBody body: HunterSignupRequest): ResponseEntity { signupService.createNewHunter(body.toDomain()) return ResponseEntity.ok().build() } }