created some structure and a concept

This commit is contained in:
Hazel Noack
2025-06-26 14:56:38 +02:00
parent d2bec96645
commit 9ded6a4615
6 changed files with 72 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
package rest_handler
import (
"net/http"
"gitea.elara.ws/Hazel/hangman/internal/session"
"github.com/labstack/echo/v4"
)
func CreateSession(c echo.Context) error {
s := session.NewSession()
return c.JSON(http.StatusOK, s)
}

View File

@@ -0,0 +1,13 @@
package view_handler
import (
"net/http"
"github.com/labstack/echo/v4"
)
func CreateSession(c echo.Context) error {
return c.Render(http.StatusOK, "create_session", map[string]interface{}{
"name": "create session",
})
}

View File

@@ -0,0 +1,13 @@
package view_handler
import (
"net/http"
"github.com/labstack/echo/v4"
)
func CreateUser(c echo.Context) error {
return c.Render(http.StatusOK, "create_user", map[string]interface{}{
"name": c.Param("name"),
})
}