From ea2a26ece011134a96902901a354761fa59f22f2 Mon Sep 17 00:00:00 2001 From: tgs266 <siegel.tucker@gmail.com> Date: Thu, 23 Sep 2021 16:11:26 -0400 Subject: [PATCH] change errors to config --- controllers/data_download_controller.go | 2 +- controllers/freezing_dates_controller.go | 2 +- controllers/gdd_controller.go | 4 ++-- controllers/misc_controller.go | 4 ++-- controllers/nomads_controller.go | 6 +++--- controllers/seed_controllers.go | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/controllers/data_download_controller.go b/controllers/data_download_controller.go index b08a87a..957f293 100644 --- a/controllers/data_download_controller.go +++ b/controllers/data_download_controller.go @@ -14,7 +14,7 @@ import ( // @Description Get gdd data csv // @Accept json // @Produce text/csv -// @Failure 400 {object} errors.StandardError +// @Failure 400 {object} config.StandardError // @Param analog query boolean false "Add analog data to csv" // @Param cfs query boolean false "Add cfs data to csv" // @Param cfs_upper query boolean false "Add cfs upper bound data to csv" diff --git a/controllers/freezing_dates_controller.go b/controllers/freezing_dates_controller.go index 25f02cd..e2c37ce 100644 --- a/controllers/freezing_dates_controller.go +++ b/controllers/freezing_dates_controller.go @@ -14,7 +14,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.FreezingDateResponse -// @Failure 400 {object} errors.StandardError +// @Failure 400 {object} config.StandardError // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" // @Param freezing_temp query number true "Freezing temperature to use" diff --git a/controllers/gdd_controller.go b/controllers/gdd_controller.go index ae8487b..86448a2 100644 --- a/controllers/gdd_controller.go +++ b/controllers/gdd_controller.go @@ -17,7 +17,7 @@ var GetGddValues = services.GetGddValues // @Accept json // @Produce json // @Success 200 {object} models.GddResponse -// @Failure 400 {object} errors.StandardError +// @Failure 400 {object} config.StandardError // @Param year query int true "Year to get gdd for" // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // @Param latitude query number true "Latitude to search for" @@ -37,7 +37,7 @@ func GetDailyGdd(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.GddResponse -// @Failure 400 {object} errors.StandardError +// @Failure 400 {object} config.StandardError // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" diff --git a/controllers/misc_controller.go b/controllers/misc_controller.go index cc974e8..ab8af71 100644 --- a/controllers/misc_controller.go +++ b/controllers/misc_controller.go @@ -18,7 +18,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.AnalogResponse -// @Failure 400 {object} errors.StandardError +// @Failure 400 {object} config.StandardError // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" // @Router /api/weather/gdd/analog [get] @@ -44,7 +44,7 @@ func GetAnalogYear(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.ConfidenceIntervalResposne -// @Failure 400 {object} errors.StandardError +// @Failure 400 {object} config.StandardError // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" diff --git a/controllers/nomads_controller.go b/controllers/nomads_controller.go index 3a4b1a1..fb0cac7 100644 --- a/controllers/nomads_controller.go +++ b/controllers/nomads_controller.go @@ -14,7 +14,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.GefsGddResponse -// @Failure 400 {object} errors.StandardError +// @Failure 400 {object} config.StandardError // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" @@ -32,7 +32,7 @@ func GetGefsGDD(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.CfsGddResponse -// @Failure 400 {object} errors.StandardError +// @Failure 400 {object} config.StandardError // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" @@ -50,7 +50,7 @@ func GetCfsGDD(c *fiber.Ctx) error { // // @Accept json // // @Produce json // // @Success 200 {object} models.CfsGddResponse -// // @Failure 400 {object} errors.StandardError +// // @Failure 400 {object} config.StandardError // // @Param product query string true "Crop to calculate gdd for" Enums(corn, soybean, sunflower, tomato, sugar_beet, peanut, cotton, potato, wheat, pea, oat, spring_wheat, rice, sorghum) // // @Param latitude query number true "Latitude to search for" // // @Param longitude query number true "Longitude to search for" diff --git a/controllers/seed_controllers.go b/controllers/seed_controllers.go index 13f926e..24ca5b7 100644 --- a/controllers/seed_controllers.go +++ b/controllers/seed_controllers.go @@ -15,7 +15,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} models.SeedListResponse -// @Failure 400 {object} errors.StandardError +// @Failure 400 {object} config.StandardError // @Param product query string true "Crop type to use" Enums(corn, soybean) // @Router /api/weather/gdd/seeds [get] func GetSeedList(c *fiber.Ctx) error { @@ -32,7 +32,7 @@ func GetSeedList(c *fiber.Ctx) error { // @Accept json // @Produce json // @Success 200 {object} models.CornMaturityResponse -// @Failure 400 {object} errors.StandardError +// @Failure 400 {object} config.StandardError // @Param latitude query number true "Latitude to search for" // @Param longitude query number true "Longitude to search for" // @Param seed query string true "Corn seed to use" -- GitLab