diff app/handlers.go @ 12:aaf85ae1f942

add very simple html template
author Dennis C. M. <dennis@denniscm.com>
date Thu, 20 Mar 2025 11:12:21 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/handlers.go	Thu Mar 20 11:12:21 2025 +0000
@@ -0,0 +1,15 @@
+package app
+
+import (
+	"net/http"
+
+	"github.com/denniscmcom/pacobot/store"
+	"github.com/gin-gonic/gin"
+)
+
+func Index(c *gin.Context) {
+	c.HTML(http.StatusOK, "index.html", gin.H{
+		"title":    "Pacobot",
+		"isLogged": store.IsAccessTokenSet(),
+	})
+}