refactor(models): Rename Request model
This commit is contained in:
@@ -15,11 +15,11 @@ import (
|
||||
// @Description Generate a contract based on the provided data
|
||||
// @Tags contracts
|
||||
// @Accept json
|
||||
// @Param data body models.Contract true "Contract data"
|
||||
// @Param data body models.ContractRequest true "Contract data"
|
||||
// @Produce application/pdf
|
||||
// @Router /contracts [post]
|
||||
func GenerateContract(c *fiber.Ctx) error {
|
||||
contract := new(models.Contract)
|
||||
contract := new(models.ContractRequest)
|
||||
if err := c.BodyParser(contract); err != nil {
|
||||
return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
|
||||
"error": err.Error(),
|
||||
|
||||
Reference in New Issue
Block a user