Skip to content

Commit ed7ff26

Browse files
committed
another vatis fix
1 parent 96e21ee commit ed7ff26

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

backend/internal/handlers/external.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func NewExternalHandler(router chi.Router, airportService *airports.AirportServi
3131

3232
// Soon(TM)
3333
func (h *ExternalHandler) vatis(w http.ResponseWriter, r *http.Request) {
34-
var dto *dtos.VATISRequest
34+
dto := &dtos.VATISRequest{}
3535
if err := render.Bind(r, dto); err != nil {
3636
response.Respond(w, r, nil, http.StatusBadRequest)
3737
return

backend/internal/handlers/handlers.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ import (
99
)
1010

1111
type Handlers struct {
12-
AirportHandler *AirportHandler
13-
AuthHandler *AuthHandler
14-
PIREPHandler *PIREPHandler
15-
ChartHandler *ChartHandler
12+
AirportHandler *AirportHandler
13+
AuthHandler *AuthHandler
14+
PIREPHandler *PIREPHandler
15+
ChartHandler *ChartHandler
16+
ExternalHandler *ExternalHandler
1617
}
1718

1819
type Services struct {
@@ -31,6 +32,7 @@ func RegisterHandlers(
3132
h.AuthHandler = NewAuthHandler(router, services.AuthService)
3233
h.PIREPHandler = NewPIREPHandler(router, services.PIREPService)
3334
h.ChartHandler = NewChartHandler(router, services.ChartService, services.AirportService)
35+
h.ExternalHandler = NewExternalHandler(router, services.AirportService)
3436

3537
return router, h
3638
}

0 commit comments

Comments
 (0)