modified: .env
modified: bot.db modified: db/db.go modified: go.mod modified: go.sum modified: handlers/dashboard.go modified: main.go modified: services/openrouter.go modified: templates/dashboard.html
This commit is contained in:
10
main.go
10
main.go
@@ -1,13 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"whatsapp-bot/db"
|
||||
"whatsapp-bot/handlers"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
// 1. Load the .env file
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
log.Println("Warning: No .env file found. Hope you set your vars manually, seki.")
|
||||
}
|
||||
|
||||
db.Init()
|
||||
|
||||
r := gin.Default()
|
||||
@@ -21,6 +30,7 @@ func main() {
|
||||
r.GET("/dashboard", handlers.ShowDashboard)
|
||||
r.POST("/admin/test-ai", handlers.TestAIHandler)
|
||||
r.DELETE("/admin/appointment/:id", handlers.DeleteAppointmentHandler)
|
||||
r.POST("/admin/appointment", handlers.CreateAppointmentHandler)
|
||||
|
||||
// A little something for the root so you don't get a 404 again, seki
|
||||
r.GET("/", func(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user