Adds stubs for some basic Team CRUD
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package net.halfbinary.scavengerhuntapi.controller
|
||||
|
||||
import jakarta.validation.Valid
|
||||
import net.halfbinary.scavengerhuntapi.model.HuntId
|
||||
import net.halfbinary.scavengerhuntapi.model.request.TeamRequest
|
||||
import net.halfbinary.scavengerhuntapi.model.response.TeamResponse
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.PathVariable
|
||||
import org.springframework.web.bind.annotation.PostMapping
|
||||
import org.springframework.web.bind.annotation.RequestBody
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@RestController
|
||||
@RequestMapping("hunt/{id}/team")
|
||||
class TeamController {
|
||||
@GetMapping
|
||||
fun listHuntTeams(@PathVariable id: HuntId): ResponseEntity<List<TeamResponse>> {
|
||||
TODO()
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
fun createHuntTeam(@PathVariable id: HuntId, @Valid @RequestBody team: TeamRequest) {
|
||||
TODO()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user