Skip to content

Commit

Permalink
another vatis fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dhawton committed Mar 3, 2024
1 parent 96e21ee commit ed7ff26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/internal/handlers/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func NewExternalHandler(router chi.Router, airportService *airports.AirportServi

// Soon(TM)
func (h *ExternalHandler) vatis(w http.ResponseWriter, r *http.Request) {
var dto *dtos.VATISRequest
dto := &dtos.VATISRequest{}
if err := render.Bind(r, dto); err != nil {
response.Respond(w, r, nil, http.StatusBadRequest)
return
Expand Down
10 changes: 6 additions & 4 deletions backend/internal/handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import (
)

type Handlers struct {
AirportHandler *AirportHandler
AuthHandler *AuthHandler
PIREPHandler *PIREPHandler
ChartHandler *ChartHandler
AirportHandler *AirportHandler
AuthHandler *AuthHandler
PIREPHandler *PIREPHandler
ChartHandler *ChartHandler
ExternalHandler *ExternalHandler
}

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

return router, h
}

0 comments on commit ed7ff26

Please sign in to comment.