mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-10 12:46:53 +00:00
23 lines
497 B
Go
23 lines
497 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.HostViewModel{
|
|
Name: hc.Name,
|
|
Address: hc.Address,
|
|
ZipCode: hc.ZipCode,
|
|
City: hc.City,
|
|
PhoneNumber: hc.PhoneNumber,
|
|
Email: hc.Email,
|
|
}))
|
|
}
|
|
}
|