thank you clippy very cool
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use actix_web::{
|
||||
get,
|
||||
http::header::ContentType,
|
||||
web::{self, Json},
|
||||
web::{self},
|
||||
HttpResponse, Responder,
|
||||
};
|
||||
use backend::{
|
||||
@@ -86,7 +86,7 @@ async fn api_test() -> impl Responder {
|
||||
#[get("api/vehicle/{id}")]
|
||||
async fn api_vehicle(id: web::Path<String>) -> impl Responder {
|
||||
let id = id.into_inner();
|
||||
let fetched_vehicle_data = get_vehicle(&mut establish_connection(), String::from(id));
|
||||
let fetched_vehicle_data = get_vehicle(&mut establish_connection(), id);
|
||||
HttpResponse::Ok()
|
||||
.content_type(ContentType::plaintext())
|
||||
.insert_header(("Access-Control-Allow-Origin", "*"))
|
||||
|
||||
Reference in New Issue
Block a user