Avvailable from external source

pages and backend are now available from everywhere on the network
This commit is contained in:
2026-04-29 14:21:55 +02:00
parent de10d694e1
commit 01c33f4a1d
2 changed files with 7 additions and 1 deletions

View File

@@ -68,6 +68,7 @@ pub async fn delete_ticket(
pub async fn get_tickets(
State(data): State<Arc<AppState>>,
) -> Result<impl IntoResponse, (StatusCode, Json<serde_json::Value>)> {
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::<Vec<TicketResponse>>();
let json_response = serde_json::json!(ticket_response);
println!("Json contructed");
Ok(Json(json_response))
}

View File

@@ -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"