Upstream sync

This commit is contained in:
Senad Uka
2023-10-17 11:51:48 +02:00
parent 3ff212d6d2
commit 5b1acd1c5f
2 changed files with 7 additions and 3 deletions

View File

@@ -215,6 +215,9 @@ func CreateContract(c *gin.Context) {
Status: models.ContractStatusDraft, Status: models.ContractStatusDraft,
StartPlaceName: payload.StartPlaceName, StartPlaceName: payload.StartPlaceName,
EndPlaceName: payload.EndPlaceName, EndPlaceName: payload.EndPlaceName,
Name: payload.Name,
EndLat: payload.EndLat,
EndLon: payload.EndLon,
} }
if err := db.Create(&newContract).Error; err != nil { if err := db.Create(&newContract).Error; err != nil {

View File

@@ -301,6 +301,7 @@ type CreateContractRequestPayload struct {
EndPlaceName string `json:"endPlaceName"` EndPlaceName string `json:"endPlaceName"`
EndLat float64 `json:"endLat"` EndLat float64 `json:"endLat"`
EndLon float64 `json:"endLon"` EndLon float64 `json:"endLon"`
Name string `json:"name"`
} }
func (Contract) Update() (bool, error) { func (Contract) Update() (bool, error) {