chemlib/store/
assignment_stroe.rs

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

use crate::dto::assignment_response::AssignmentResponse;

const DOMAIN: &str = "chem";

pub struct AssignmentStore {}

impl AssignmentStore {
    pub async fn get_by_id(id: Uuid) -> Result<AssignmentResponse, String> {
        get::<AssignmentResponse>(build_exp_link(DOMAIN, format!("/assignment/{}", id))).await
    }
}