use random word library
This commit is contained in:
@@ -4,11 +4,11 @@ import (
|
||||
"net/http"
|
||||
|
||||
"gitea.elara.ws/Hazel/hangman/internal/game"
|
||||
"gitea.elara.ws/Hazel/hangman/internal/words"
|
||||
"gitea.elara.ws/Hazel/words"
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func CreateSession(c echo.Context) error {
|
||||
s := game.NewSession(words.GetRandomWord())
|
||||
s := game.NewSession(words.Words.GetRandomWord())
|
||||
return c.JSON(http.StatusOK, s)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user