diff --git a/backend/src/handlers/ticket.rs b/backend/src/handlers/ticket.rs index 28fc16e..e4ae579 100644 --- a/backend/src/handlers/ticket.rs +++ b/backend/src/handlers/ticket.rs @@ -68,6 +68,7 @@ pub async fn delete_ticket( pub async fn get_tickets( State(data): State>, ) -> Result)> { + println!("get_tickets called"); let tickets = sqlx::query_as::<_, Ticket>( r#"SELECT * FROM tickets WHERE status <> 'Archived' ORDER BY date DESC"#, ) @@ -80,6 +81,7 @@ pub async fn get_tickets( }); (StatusCode::INTERNAL_SERVER_ERROR, Json(error_response)) })?; + println!("Tickets fetched"); let ticket_response = tickets .iter() @@ -87,6 +89,7 @@ pub async fn get_tickets( .collect::>(); let json_response = serde_json::json!(ticket_response); + println!("Json contructed"); Ok(Json(json_response)) } diff --git a/frontend/Trunk.toml b/frontend/Trunk.toml index e46184f..873c674 100644 --- a/frontend/Trunk.toml +++ b/frontend/Trunk.toml @@ -1,7 +1,10 @@ [serve] # The address to serve on LAN. -addresses = ["127.0.0.1"] +addresses = ["127.0.0.1", "Brick"] # The address to serve on WAN. # address = "0.0.0.0" # The port to serve on. port = 8000 + +[[proxy]] +backend = "http://localhost:8001/api"