(
State(worker_ctx): State<S>,
Path(DatabaseParam { name_or_identity }): Path<DatabaseParam>,
)
| 590 | } |
| 591 | |
| 592 | pub async fn db_info<S: ControlStateDelegate>( |
| 593 | State(worker_ctx): State<S>, |
| 594 | Path(DatabaseParam { name_or_identity }): Path<DatabaseParam>, |
| 595 | ) -> axum::response::Result<impl IntoResponse> { |
| 596 | log::trace!("Trying to resolve database identity: {name_or_identity:?}"); |
| 597 | let database_identity = name_or_identity.resolve(&worker_ctx).await?; |
| 598 | log::trace!("Resolved identity to: {database_identity:?}"); |
| 599 | let database = worker_ctx_find_database(&worker_ctx, &database_identity) |
| 600 | .await? |
| 601 | .ok_or(NO_SUCH_DATABASE)?; |
| 602 | log::trace!("Fetched database from the worker db for database identity: {database_identity:?}"); |
| 603 | |
| 604 | let response = DatabaseResponse::from(database); |
| 605 | Ok(axum::Json(sats::serde::SerdeWrapper(response))) |
| 606 | } |
| 607 | |
| 608 | #[derive(Deserialize)] |
| 609 | pub struct LogsParams { |
nothing calls this directly
no test coverage detected
searching dependent graphs…