mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-11 05:06:52 +00:00
27 lines
497 B
Go
27 lines
497 B
Go
package server
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
"strconv"
|
|
|
|
"github.com/labstack/echo/v4"
|
|
|
|
"github.com/rjNemo/rentease/internal/service/booking"
|
|
"github.com/rjNemo/rentease/internal/view"
|
|
)
|
|
|
|
func handleCreatePaymentModal(bs *booking.Service) echo.HandlerFunc {
|
|
return func(c echo.Context) error {
|
|
idStr := c.Param("id")
|
|
id, err := strconv.Atoi(idStr)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
b := bs.One(id)
|
|
log.Println(b)
|
|
|
|
return renderTempl(c, http.StatusOK, view.PaymentModal(b.Id))
|
|
}
|
|
}
|