mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-11 05:06:52 +00:00
24 lines
527 B
Go
24 lines
527 B
Go
package server
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/labstack/echo/v4"
|
|
|
|
"github.com/rjNemo/rentease/config"
|
|
"github.com/rjNemo/rentease/internal/view"
|
|
)
|
|
|
|
func handleHomePage(hc *config.Host) echo.HandlerFunc {
|
|
return func(ctx echo.Context) error {
|
|
return renderTempl(ctx, http.StatusOK, view.Index(&view.HomePageViewModel{
|
|
Name: hc.Name,
|
|
Address: hc.Address,
|
|
ZipCode: hc.ZipCode,
|
|
City: hc.City,
|
|
PhoneNumber: hc.PhoneNumber,
|
|
Email: hc.Email,
|
|
Items: hc.Items,
|
|
}))
|
|
}
|
|
}
|