feat: complete go rewrite
This commit is contained in:
19
internal/handlers/subscribers.go
Normal file
19
internal/handlers/subscribers.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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})
|
||||
}
|
||||
Reference in New Issue
Block a user