chemlib/store/
element_store.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
use common::store::{build_exp_link, get};

use crate::dto::element_response::ElementResponse;

const DOMAIN: &str = "chem";

pub struct ElementStore {}

impl ElementStore {
    pub async fn get_all() -> Result<Vec<ElementResponse>, String> {
        get::<Vec<ElementResponse>>(build_exp_link(DOMAIN, format!("/element/getAll"))).await
    }
}