Rename to new

This commit is contained in:
ekzyis 2025-01-26 00:37:57 +01:00
parent 6df1ac0a70
commit ddfe149e91
4 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ import (
"github.com/lightningnetwork/lnd/lnwire"
)
func HandleCreate(sc context.Context) echo.HandlerFunc {
func HandleNew(sc context.Context) echo.HandlerFunc {
return func(c echo.Context) error {
var (
db = sc.Db

View File

@ -14,7 +14,7 @@ templ Nav() {
>
<div>
<button hx-get="/">markets</button>
<button hx-get="/create">create</button>
<button hx-get="/new">new</button>
</div>
<div class="ms-auto">
<button hx-get="/about">about</button>

View File

@ -38,7 +38,7 @@ templ Index(markets []types.Market) {
</div>
} else {
<form
hx-post="/create"
hx-post="/new"
hx-target="#modal"
hx-swap="outerHTML"
hx-select="#modal"

View File

@ -14,8 +14,8 @@ func Init(e *echo.Echo, sc Context) {
e.Use(middleware.Session(sc))
e.GET("/", handler.HandleIndex(sc))
e.GET("/create", handler.HandleIndex(sc))
e.POST("/create", handler.HandleCreate(sc), middleware.SessionGuard(sc))
e.GET("/new", handler.HandleIndex(sc))
e.POST("/new", handler.HandleNew(sc), middleware.SessionGuard(sc))
e.GET("/market/:id", handler.HandleMarket(sc))
e.POST("/market/:id/order", handler.HandleOrder(sc), middleware.SessionGuard(sc))
e.GET("/about", handler.HandleAbout(sc))