mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 19:47:43 +01:00
chore: update extension detail API URL (#897)
Now we send requests to the dfault Coco server.
This commit is contained in:
@@ -177,9 +177,10 @@ pub(crate) async fn search_extension(
|
|||||||
pub(crate) async fn extension_detail(
|
pub(crate) async fn extension_detail(
|
||||||
id: String,
|
id: String,
|
||||||
) -> Result<Option<JsonObject<String, Json>>, String> {
|
) -> Result<Option<JsonObject<String, Json>>, String> {
|
||||||
let url = format!("http://dev.infini.cloud:27200/store/extension/{}", id);
|
let path = format!("store/extension/{}", id);
|
||||||
let response =
|
let response = HttpClient::get("default_coco_server", path.as_str(), None)
|
||||||
HttpClient::send_raw_request(Method::GET, url.as_str(), None, None, None).await?;
|
.await
|
||||||
|
.map_err(|e| format!("Failed to send request: {:?}", e))?;
|
||||||
|
|
||||||
if response.status() == StatusCode::NOT_FOUND {
|
if response.status() == StatusCode::NOT_FOUND {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
|
|||||||
Reference in New Issue
Block a user