feat: gamemaster
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"galaxy/model/rest"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func BanishHandler(c *gin.Context, executor CommandExecutor) {
|
||||
var req rest.BanishRequest
|
||||
if errorResponse(c, c.ShouldBindJSON(&req)) {
|
||||
return
|
||||
}
|
||||
|
||||
if errorResponse(c, executor.BanishRace(req.RaceName)) {
|
||||
return
|
||||
}
|
||||
|
||||
c.Status(http.StatusNoContent)
|
||||
}
|
||||
Reference in New Issue
Block a user