Skip to content
Snippets Groups Projects
Commit 1930db21 authored by Tucker Gary Siegel's avatar Tucker Gary Siegel
Browse files

hopefully this works

parent 591367c1
No related branches found
No related tags found
No related merge requests found
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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment