Added delete client routes to the api
This commit is contained in:
parent
fbef0cbeba
commit
b136071e8c
@ -222,6 +222,30 @@ pub async fn delete_project(project_id: &Uuid) -> Result<(), err::Error> {
|
|||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn delete_agent(agent_id: &Uuid) -> Result<(), err::Error> {
|
||||||
|
perform_request_without_client::<String, ()>(
|
||||||
|
BASE_URL.into(),
|
||||||
|
Method::DELETE,
|
||||||
|
format!("admin/agent/{agent_id}"),
|
||||||
|
None,
|
||||||
|
200,
|
||||||
|
Vec::new(),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
}
|
||||||
|
pub async fn delete_unit(unit_id: &Uuid) -> Result<(), err::Error> {
|
||||||
|
perform_request_without_client::<String, ()>(
|
||||||
|
BASE_URL.into(),
|
||||||
|
Method::DELETE,
|
||||||
|
format!("admin/unit/{unit_id}"),
|
||||||
|
None,
|
||||||
|
200,
|
||||||
|
Vec::new(),
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
}
|
||||||
|
|
||||||
pub async fn upload_image(item: Item, body: Vec<u8>) -> Result<String, err::Error> {
|
pub async fn upload_image(item: Item, body: Vec<u8>) -> Result<String, err::Error> {
|
||||||
perform_multipart_request_without_client(
|
perform_multipart_request_without_client(
|
||||||
|
Loading…
Reference in New Issue
Block a user