Adds basic hunter signup endpoint

This commit is contained in:
2025-12-03 21:38:28 -06:00
parent 78489010be
commit 8b808bfd34
5 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package net.halfbinary.scavengerhuntapi.controller
import net.halfbinary.scavengerhuntapi.model.converter.toDomain
import net.halfbinary.scavengerhuntapi.model.request.HunterSignupRequest
import net.halfbinary.scavengerhuntapi.service.SignupService
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(@RequestBody body: HunterSignupRequest) {
signupService.createNewHunter(body.toDomain())
}
}