File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ func getAirportATC(c *gin.Context) {
91
91
return
92
92
}
93
93
94
+ if airport == nil {
95
+ response .RespondError (c , http .StatusNotFound , "Airport Not Found" )
96
+ return
97
+ }
98
+
94
99
atc , err := database .FindAirportATCByID (airport .ID )
95
100
if err != nil {
96
101
response .RespondError (c , http .StatusInternalServerError , "Internal Server Error" )
@@ -120,6 +125,11 @@ func getAirportCharts(c *gin.Context) {
120
125
return
121
126
}
122
127
128
+ if airport == nil {
129
+ response .RespondError (c , http .StatusNotFound , "Airport Not Found" )
130
+ return
131
+ }
132
+
123
133
charts , err := database .FindAirportChartsByID (airport .ID )
124
134
if err != nil {
125
135
response .RespondError (c , http .StatusInternalServerError , "Internal Server Error" )
@@ -149,6 +159,11 @@ func getAirportWeather(c *gin.Context) {
149
159
return
150
160
}
151
161
162
+ if airport == nil {
163
+ response .RespondError (c , http .StatusNotFound , "Airport Not Found" )
164
+ return
165
+ }
166
+
152
167
d := & dto.AirportWeatherDTO {
153
168
ID : airport .ICAO ,
154
169
}
You can’t perform that action at this time.
0 commit comments