(
State(state): State<Arc<ServerState>>,
Path(id): Path<String>,
Json(req): Json<SetAuthRequest>,
)
| 4493 | } |
| 4494 | |
| 4495 | async fn set_auth( |
| 4496 | State(state): State<Arc<ServerState>>, |
| 4497 | Path(id): Path<String>, |
| 4498 | Json(req): Json<SetAuthRequest>, |
| 4499 | ) -> Result<Json<serde_json::Value>> { |
| 4500 | let auth_info = parse_auth_info_payload(req.body) |
| 4501 | .ok_or_else(|| ApiError::BadRequest("Invalid auth payload".to_string()))?; |
| 4502 | state.auth_manager.set(&id, auth_info).await; |
| 4503 | Ok(Json(serde_json::json!({ "success": true }))) |
| 4504 | } |
| 4505 | |
| 4506 | async fn delete_auth( |
| 4507 | State(state): State<Arc<ServerState>>, |
nothing calls this directly
no test coverage detected