Adds basic hunter signup endpoint
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package net.halfbinary.scavengerhuntapi.service
|
||||
|
||||
import net.halfbinary.scavengerhuntapi.model.converter.toRecord
|
||||
import net.halfbinary.scavengerhuntapi.model.domain.Hunter
|
||||
import net.halfbinary.scavengerhuntapi.repository.HunterRepository
|
||||
import org.springframework.stereotype.Service
|
||||
|
||||
@Service
|
||||
class SignupService(private val hunterRepository: HunterRepository) {
|
||||
fun createNewHunter(hunter: Hunter) {
|
||||
hunterRepository.save(hunter.toRecord())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user