From 90303e558ed799bb167c14c4f1e5e6103109e477 Mon Sep 17 00:00:00 2001 From: Andrew Karpow Date: Mon, 14 Oct 2024 10:17:14 -0400 Subject: [PATCH] [geomap] require provider --- internal/controller/geomap.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/controller/geomap.go b/internal/controller/geomap.go index b0ecfef5..5813c9da 100644 --- a/internal/controller/geomap.go +++ b/internal/controller/geomap.go @@ -82,6 +82,10 @@ func (c GeoMapController) PostGeomaps(params geographic_maps.PostGeomapsParams) geomap.ProjectID = &projectID } + if geomap.Provider == "" { + return geographic_maps.NewPostGeomapsBadRequest().WithPayload(utils.MissingProvider) + } + // Set default values if err := utils.SetModelDefaults(geomap); err != nil { panic(err)