appslib/store/
scene_store.rsuse common::store:: get;
use uuid::Uuid;
use crate::dto::scene_response::SceneResponse;
const DOMAIN: &str = "apps";
const CLUSTER: &str = "devapi.webschool.au";
const SUFFIX: &str = "";
pub struct SceneStore {}
impl SceneStore {
pub async fn build_ws_link(project: impl Into<String>, url: impl Into<String>) -> String {
format!("{}://{}{}{}{}", "https", project.into(), SUFFIX, CLUSTER, url.into())
}
pub async fn get_by_id(id: Uuid) -> Result<SceneResponse, String> {
get::<SceneResponse>(Self::build_ws_link(DOMAIN, format!("/scene/{}", id)).await).await
}
}