MCPcopy Create free account
hub / github.com/acking-you/static_flow / fetch_admin_comment_task

Function fetch_admin_comment_task

crates/frontend/src/api.rs:4119–4142  ·  view source on GitHub ↗
(task_id: &str)

Source from the content-addressed store, hash-verified

4117}
4118
4119pub async fn fetch_admin_comment_task(task_id: &str) -> Result<AdminCommentTask, String> {
4120 #[cfg(feature = "mock")]
4121 {
4122 let _ = task_id;
4123 Err("not found".to_string())
4124 }
4125
4126 #[cfg(not(feature = "mock"))]
4127 {
4128 let url =
4129 format!("{}/admin/comments/tasks/{}", admin_base(), urlencoding::encode(task_id),);
4130 let response = api_get(&url)
4131 .send()
4132 .await
4133 .map_err(|e| format!("Network error: {:?}", e))?;
4134 if !response.ok() {
4135 return Err(format!("HTTP error: {}", response.status()));
4136 }
4137 response
4138 .json()
4139 .await
4140 .map_err(|e| format!("Parse error: {:?}", e))
4141 }
4142}
4143
4144pub async fn fetch_admin_comment_task_ai_output(
4145 task_id: &str,

Callers 1

admin_pageFunction · 0.85

Calls 2

api_getFunction · 0.85
okMethod · 0.80

Tested by

no test coverage detected