(path: &str, body: &B)
| 2625 | |
| 2626 | #[cfg(not(feature = "mock"))] |
| 2627 | async fn patch_admin_gpt2api_rs<B, T>(path: &str, body: &B) -> Result<T, String> |
| 2628 | where |
| 2629 | B: Serialize, |
| 2630 | T: DeserializeOwned, |
| 2631 | { |
| 2632 | let url = format!("{}/admin/gpt2api-rs{path}", admin_base()); |
| 2633 | let response = api_patch(&url) |
| 2634 | .json(body) |
| 2635 | .map_err(|e| format!("Serialize error: {:?}", e))? |
| 2636 | .send() |
| 2637 | .await |
| 2638 | .map_err(|e| format!("Network error: {:?}", e))?; |
| 2639 | parse_admin_gpt2api_rs_response(response).await |
| 2640 | } |
| 2641 | |
| 2642 | #[cfg(not(feature = "mock"))] |
| 2643 | async fn delete_admin_gpt2api_rs_empty<T>(path: &str) -> Result<T, String> |
no test coverage detected