(
_state: State<Arc<ServerState>>,
Path(name): Path<String>,
)
| 4651 | } |
| 4652 | |
| 4653 | async fn plugin_auth_load( |
| 4654 | _state: State<Arc<ServerState>>, |
| 4655 | Path(name): Path<String>, |
| 4656 | ) -> Result<Json<PluginAuthLoadResponse>> { |
| 4657 | let bridge = get_auth_bridge(&name).await?; |
| 4658 | |
| 4659 | let result = bridge |
| 4660 | .load() |
| 4661 | .await |
| 4662 | .map_err(|e| ApiError::BadRequest(e.to_string()))?; |
| 4663 | |
| 4664 | Ok(Json(PluginAuthLoadResponse { |
| 4665 | api_key: result.api_key, |
| 4666 | has_custom_fetch: result.has_custom_fetch, |
| 4667 | })) |
| 4668 | } |
| 4669 | |
| 4670 | #[derive(Debug, Deserialize)] |
| 4671 | struct PluginAuthFetchRequest { |
nothing calls this directly
no test coverage detected