From 1930db21b00a4b309b3cebaa8b0253c6757d23ca Mon Sep 17 00:00:00 2001 From: Tucker Siegel <tgsiegel@terpmail.umd.edu> Date: Sat, 3 Dec 2022 00:44:38 -0500 Subject: [PATCH] hopefully this works --- services/gdd_service.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/gdd_service.go b/services/gdd_service.go index 7f2716c..b3ce4ed 100644 --- a/services/gdd_service.go +++ b/services/gdd_service.go @@ -1,6 +1,7 @@ package services import ( + "fmt" "time" "github.com/tgs266/dawn-go-common/common" @@ -18,10 +19,11 @@ func GetGddValues(ctx common.DawnCtx, request models.GddRequest) models.GddRespo if request.PlantingDate.Year() == time.Now().Year() { gdds = persistence.CurrentGddFindFirstByYearAndLocation(ctx, request.BuildLocation()) } else if request.PlantingDate.Year() > time.Now().Year() { + fmt.Println("yooooo") return models.GddResponse{ Product: product.Name, - ClosestLatitude: gdds.Location.Coordinates[1], - ClosestLongitude: gdds.Location.Coordinates[0], + ClosestLatitude: request.Latitude, + ClosestLongitude: request.Longitude, GddValues: []float64{}, } } else { -- GitLab