package handlers import ( "log" "git.odit.services/lfk/document-server/models" "github.com/gofiber/fiber/v2" ) // GenerateContract godoc // @Summary Generate a contract // @Description Generate a contract based on the provided data // @Tags contracts // @Accept json // @Param data body models.Contract true "Contract data" // @Produce application/pdf // @Router /contracts [post] func GenerateContract(c *fiber.Ctx) error { contract := new(models.Contract) if err := c.BodyParser(contract); err != nil { return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{ "error": err.Error(), }) } log.Println(contract.Runners[0].Group.ParentGroup) return c.SendString("Contract generated") }