You've already forked AstralRinth
forked from didirus/AstralRinth
Add metadata GV loader api (#84)
* Add metadata GV loader api * Register commands * fix lint + docs issue
This commit is contained in:
21
theseus_gui/src-tauri/src/api/metadata.rs
Normal file
21
theseus_gui/src-tauri/src/api/metadata.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
use crate::api::Result;
|
||||
use daedalus::minecraft::VersionManifest;
|
||||
use daedalus::modded::Manifest;
|
||||
|
||||
/// Gets the game versions from daedalus
|
||||
#[tauri::command]
|
||||
pub async fn metadata_get_game_versions() -> Result<VersionManifest> {
|
||||
Ok(theseus::metadata::get_minecraft_versions().await?)
|
||||
}
|
||||
|
||||
/// Gets the fabric versions from daedalus
|
||||
#[tauri::command]
|
||||
pub async fn metadata_get_fabric_versions() -> Result<Manifest> {
|
||||
Ok(theseus::metadata::get_fabric_versions().await?)
|
||||
}
|
||||
|
||||
/// Gets the forge versions from daedalus
|
||||
#[tauri::command]
|
||||
pub async fn metadata_get_forge_versions() -> Result<Manifest> {
|
||||
Ok(theseus::metadata::get_forge_versions().await?)
|
||||
}
|
||||
@@ -5,6 +5,7 @@ use thiserror::Error;
|
||||
pub mod auth;
|
||||
pub mod jre;
|
||||
|
||||
pub mod metadata;
|
||||
pub mod pack;
|
||||
pub mod process;
|
||||
pub mod profile;
|
||||
|
||||
Reference in New Issue
Block a user