Working on inserting metars and cleanup

This commit is contained in:
2023-09-12 07:58:12 -04:00
parent f7aaa1dc81
commit e8462665b0
8 changed files with 65327 additions and 19794 deletions

View File

@@ -45,9 +45,9 @@ async fn find_all(req: HttpRequest) -> HttpResponse {
}
}
#[get("/airports/{id}")]
async fn find(id: web::Path<i32>) -> HttpResponse {
match Airports::find(id.into_inner()) {
#[get("/airports/{icao}")]
async fn find(icao: web::Path<String>) -> HttpResponse {
match Airports::find(icao.into_inner()) {
Ok(a) => HttpResponse::Ok().json(a),
Err(err) => {
error!("{}", err);