feat: turn generate api
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/google/uuid"
|
||||
"github.com/iliadenisov/galaxy/internal/model/rest"
|
||||
"github.com/iliadenisov/galaxy/internal/router"
|
||||
"github.com/iliadenisov/galaxy/internal/router/handler"
|
||||
@@ -19,8 +18,12 @@ func (e *dummyExecutor) Execute(command ...handler.Command) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *dummyExecutor) GenerateGame(races []string) (uuid.UUID, error) {
|
||||
return uuid.New(), nil
|
||||
func (e *dummyExecutor) GenerateGame(races []string) (rest.StateResponse, error) {
|
||||
return rest.StateResponse{}, nil
|
||||
}
|
||||
|
||||
func (e *dummyExecutor) GenerateTurn() (rest.StateResponse, error) {
|
||||
return rest.StateResponse{}, nil
|
||||
}
|
||||
|
||||
func (e *dummyExecutor) GameState() (rest.StateResponse, error) {
|
||||
@@ -32,7 +35,6 @@ func setupRouter() *gin.Engine {
|
||||
}
|
||||
|
||||
func setupRouterExecutor(e handler.CommandExecutor) *gin.Engine {
|
||||
gin.SetMode(gin.TestMode)
|
||||
return router.SetupRouter(e)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user