go #49

Merged
niggl merged 96 commits from go into main 2024-12-12 15:11:31 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 670290b60b - Show all commits

View File

@ -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(),

View File

@ -1,6 +1,6 @@
package models
type Contract struct {
type ContractRequest struct {
Runners []Runner `json:"runners"`
Locale string `json:"locale" enums:"en,de"`
}