Skip to content

Commit

Permalink
[geomap] require provider
Browse files Browse the repository at this point in the history
  • Loading branch information
notandy committed Oct 14, 2024
1 parent b6b3db5 commit 90303e5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/controller/geomap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 90303e5

Please sign in to comment.