YouChuKoffee/app/http/controllers/front/ProductController.go

17 lines
425 B
Go
Raw Normal View History

2024-06-24 11:44:38 +08:00
package front
import (
"github.com/gin-gonic/gin"
"qteam/app/http/controllers"
"qteam/app/http/entities/front"
"qteam/app/services"
)
func ProductDetail(c *gin.Context) {
var request = controllers.GetRequest(c).(*front.ProductDetailRequest)
code, product := services.ProductDetail(*request)
var response = front.ProductDetailResponse{}
response.ResponseFromDb(product)
controllers.HandCodeRes(c, response, code)
}