Better deployment with air. Colorized history. Fixed table bugs. Table will be added to game if coming from QR code. With tables in the history. App could be deployed now
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"log"
|
||||
"os"
|
||||
@@ -64,7 +63,6 @@ func (tm *TemplateManager) LoadTemplates() {
|
||||
}
|
||||
|
||||
name := stripAfterDot(filepath.Base(file))
|
||||
lg.Println(name)
|
||||
|
||||
// Parse base + view template together
|
||||
tpl, err := template.New(name).
|
||||
@@ -80,7 +78,6 @@ func (tm *TemplateManager) LoadTemplates() {
|
||||
|
||||
// Render executes a template by name into the given context
|
||||
func (tm *TemplateManager) Render(c *gin.Context, name string, data gin.H) error {
|
||||
print("\nRendering template:", name, "\n")
|
||||
u := getSessionUser(c)
|
||||
|
||||
// Prefil the data for the render
|
||||
@@ -93,7 +90,6 @@ func (tm *TemplateManager) Render(c *gin.Context, name string, data gin.H) error
|
||||
if !ok {
|
||||
return os.ErrNotExist
|
||||
}
|
||||
fmt.Print(tm.templates[name])
|
||||
|
||||
if err := tpl.ExecuteTemplate(c.Writer, tm.base, data); err != nil {
|
||||
log.Println("template error:", err)
|
||||
|
||||
Reference in New Issue
Block a user