Rename to bmarket
This commit is contained in:
parent
e14a3c824d
commit
5ffc35a94f
|
@ -78,6 +78,6 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
</body>
|
||||
<script src="/market.js"></script>
|
||||
<script src="/bmarket.js"></script>
|
||||
|
||||
</html>
|
|
@ -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 {
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue