personal-website/approutes/personalPropsRoute/personalPropsRoute.go

17 lines
370 B
Go
Raw Normal View History

2023-03-15 12:32:41 +00:00
package personalpropsroute
import (
"net/http"
"personalwebsite/websiteapp/personalprops"
"github.com/gin-gonic/gin"
)
func Route(route *gin.RouterGroup) {
persPropsApp := personalprops.NewPersPropsApp()
route.GET("/test", func(ctx *gin.Context) {
test := persPropsApp.Render()
ctx.HTML(http.StatusOK, "personal-properties.html", gin.H{"books": test})
})
}