From 5ffc35a94f2090a16fbfc76439eb7a30946b5656 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sat, 9 Sep 2023 22:52:50 +0200 Subject: [PATCH] Rename to bmarket --- pages/{binary_market.html => bmarket.html} | 2 +- public/{market.js => bmarket.js} | 0 src/router.go | 4 ++-- src/server.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename pages/{binary_market.html => bmarket.html} (98%) rename public/{market.js => bmarket.js} (100%) diff --git a/pages/binary_market.html b/pages/bmarket.html similarity index 98% rename from pages/binary_market.html rename to pages/bmarket.html index ef805e4..6d45815 100644 --- a/pages/binary_market.html +++ b/pages/bmarket.html @@ -78,6 +78,6 @@ {{ end }} - + \ No newline at end of file diff --git a/public/market.js b/public/bmarket.js similarity index 100% rename from public/market.js rename to public/bmarket.js diff --git a/src/router.go b/src/router.go index cdb63ea..12f7ef6 100644 --- a/src/router.go +++ b/src/router.go @@ -196,7 +196,7 @@ func logout(c echo.Context) error { return c.Redirect(http.StatusSeeOther, "/") } -func market(c echo.Context) error { +func bmarket(c echo.Context) error { marketId := c.Param("id") var market Market err := db.QueryRow("SELECT id, description FROM markets WHERE id = $1 AND active = true", marketId).Scan(&market.Id, &market.Description) @@ -222,7 +222,7 @@ func market(c echo.Context) error { "Description": market.Description, "Shares": shares, } - return c.Render(http.StatusOK, "binary_market.html", data) + return c.Render(http.StatusOK, "bmarket.html", data) } func marketCost(c echo.Context) error { diff --git a/src/server.go b/src/server.go index 6b01c85..6cc73e0 100644 --- a/src/server.go +++ b/src/server.go @@ -63,7 +63,7 @@ func main() { e.GET("/api/login", verifyLogin) e.GET("/api/session", checkSession) e.POST("/logout", logout) - e.GET("/market/:id", sessionGuard(market)) + e.GET("/market/:id", sessionGuard(bmarket)) e.POST("/api/market/:id/cost", sessionGuard(marketCost)) e.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{ Format: "${time_custom} ${method} ${uri} ${status}\n",