Rename to new
This commit is contained in:
parent
6df1ac0a70
commit
ddfe149e91
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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"
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user