Files
admin-panel/internal/handlers/subscribers.go
2025-11-12 19:18:29 -06:00

19 lines
354 B
Go

package handlers
import (
"net/http"
"github.com/rideaware/admin-panel/internal/database"
"github.com/gin-gonic/gin"
)
func IndexGet(c *gin.Context) {
emails, err := database.GetAllEmails()
if err != nil {
c.AbortWithError(http.StatusInternalServerError, err)
return
}
c.HTML(http.StatusOK, "admin_index.html",
gin.H{"emails": emails})
}