forked from jason/cpolis
Use proper filepaths
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
@@ -91,7 +92,7 @@ func PublishLatestIssue(c *b.Config, db *b.DB, s map[string]*Session) http.Handl
|
||||
data := new(struct{ Role int })
|
||||
data.Role = session.User.Role
|
||||
|
||||
tmpl, err := template.ParseFiles(c.WebDir + "/templates/hub.html")
|
||||
tmpl, err := template.ParseFiles(filepath.Join(c.WebDir, "templates", "hub.html"))
|
||||
tmpl = template.Must(tmpl, err)
|
||||
if err = tmpl.ExecuteTemplate(w, "page-content", data); err != nil {
|
||||
log.Println(err)
|
||||
|
Reference in New Issue
Block a user