quzuu-api-dev / controller /options /option_category_controller.go
lifedebugger's picture
Deploy files from GitHub repository
e762600
raw
history blame contribute delete
521 Bytes
package options
import (
"github.com/gin-gonic/gin"
"godp.abdanhafidz.com/controller"
"godp.abdanhafidz.com/models"
"godp.abdanhafidz.com/services"
)
func AddOptions(c *gin.Context) {
options := services.OptionService{}
addOptionController := controller.Controller[[]models.OptionsRequest, []models.OptionsRequest, models.OptionsResponse]{
Service: &options.Service,
}
addOptionController.RequestJSON(c, func() {
options.Constructor = addOptionController.Request
options.Create()
})
}