Files
Rocketmc/theseus_gui/src-tauri/src/api/pack.rs
Geometrically 7a0798d9d0 Fix syncing, repairing, add edit method (#111)
* Fix syncing, repairing, add edit method

* comp err

* temp push up

* fixes

* fix more

* add frontend
2023-05-11 10:26:00 -07:00

22 lines
536 B
Rust

use crate::api::Result;
use std::path::{Path, PathBuf};
use theseus::prelude::*;
#[tauri::command]
pub async fn pack_install_version_id(
version_id: String,
pack_title: String,
pack_icon: Option<String>,
) -> Result<PathBuf> {
let res =
pack::install_pack_from_version_id(version_id, pack_title, pack_icon)
.await?;
Ok(res)
}
#[tauri::command]
pub async fn pack_install_file(path: &Path) -> Result<PathBuf> {
let res = pack::install_pack_from_file(path.to_path_buf()).await?;
Ok(res)
}