(
mut client: AuthedClient,
Json(request): Json<SqlRequest>,
)
| 264 | } |
| 265 | |
| 266 | pub async fn handle_sql( |
| 267 | mut client: AuthedClient, |
| 268 | Json(request): Json<SqlRequest>, |
| 269 | ) -> impl IntoResponse { |
| 270 | let mut res = SqlResponse { |
| 271 | results: Vec::new(), |
| 272 | }; |
| 273 | // Don't need to worry about timeouts or resetting cancel here because there is always exactly 1 |
| 274 | // request. |
| 275 | match execute_request(&mut client, request, &mut res).await { |
| 276 | Ok(()) => Ok(Json(res)), |
| 277 | Err(e) => Err((StatusCode::BAD_REQUEST, e.to_string())), |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | #[derive(Debug)] |
| 282 | pub enum ExistingUser { |
nothing calls this directly
no test coverage detected