@@ -68,9 +68,6 @@ func (h *happenings) GetHappeningsHandler(ctx *handler.Context) error {
6868func (h * happenings ) GetHappeningById (ctx * handler.Context ) error {
6969 // Extract the happening ID from the URL path
7070 id := ctx .PathValue ("id" )
71- if id == "" {
72- return ctx .Error (fmt .Errorf ("missing happening id" ), http .StatusBadRequest )
73- }
7471
7572 // Fetch the happening from the repository
7673 hap , err := h .happeningService .HappeningRepo ().GetHappeningById (ctx .Context (), id )
@@ -97,9 +94,6 @@ func (h *happenings) GetHappeningById(ctx *handler.Context) error {
9794func (h * happenings ) GetHappeningRegistrationsCount (ctx * handler.Context ) error {
9895 // Extract the happening ID from the URL path
9996 id := ctx .PathValue ("id" )
100- if id == "" {
101- return ctx .Error (fmt .Errorf ("missing happening id" ), http .StatusBadRequest )
102- }
10397
10498 // Fetch the happening from the repository
10599 hap , err := h .happeningService .HappeningRepo ().GetHappeningById (ctx .Context (), id )
@@ -187,9 +181,6 @@ func (h *happenings) GetHappeningRegistrationsCountMany(ctx *handler.Context) er
187181func (h * happenings ) GetHappeningRegistrations (ctx * handler.Context ) error {
188182 // Extract the happening ID from the URL path
189183 id := ctx .PathValue ("id" )
190- if id == "" {
191- return ctx .Error (fmt .Errorf ("missing happening id" ), http .StatusBadRequest )
192- }
193184
194185 // Fetch the registrations from the repository
195186 regs , err := h .happeningService .HappeningRepo ().GetHappeningRegistrations (ctx .Context (), id )
@@ -216,9 +207,6 @@ func (h *happenings) GetHappeningRegistrations(ctx *handler.Context) error {
216207func (h * happenings ) GetHappeningSpotRanges (ctx * handler.Context ) error {
217208 // Extract the happening ID from the URL path
218209 id := ctx .PathValue ("id" )
219- if id == "" {
220- return ctx .Error (fmt .Errorf ("missing happening id" ), http .StatusBadRequest )
221- }
222210
223211 // Fetch the spot ranges from the repository
224212 ranges , err := h .happeningService .HappeningRepo ().GetHappeningSpotRanges (ctx .Context (), id )
@@ -244,9 +232,6 @@ func (h *happenings) GetHappeningSpotRanges(ctx *handler.Context) error {
244232func (h * happenings ) GetHappeningQuestions (ctx * handler.Context ) error {
245233 // Extract the happening ID from the URL path
246234 id := ctx .PathValue ("id" )
247- if id == "" {
248- return ctx .Error (fmt .Errorf ("missing happening id" ), http .StatusBadRequest )
249- }
250235
251236 // Fetch the questions from the repository
252237 qs , err := h .happeningService .HappeningRepo ().GetHappeningQuestions (ctx .Context (), id )
@@ -275,9 +260,6 @@ func (h *happenings) GetHappeningQuestions(ctx *handler.Context) error {
275260func (h * happenings ) RegisterForHappening (ctx * handler.Context ) error {
276261 // Extract the happening ID from the URL path
277262 happeningID := ctx .PathValue ("id" )
278- if happeningID == "" {
279- return ctx .Error (fmt .Errorf ("missing happening id" ), http .StatusBadRequest )
280- }
281263
282264 // Parse request DTO
283265 var req dto.RegisterForHappeningRequest
0 commit comments