mirror of
https://github.com/modrinth/code.git
synced 2026-08-27 18:14:49 +00:00
Modpack support (#60)
* Modpack support * Finish feature * Tauri errors fix (#61) * async impl * working * fmt and redundancy * moved ? to if let Ok block * Finish modpacks support * remove generated file * fix compile err * fix lint * Fix code review comments + forge support --------- Co-authored-by: Wyatt Verchere <wverchere@gmail.com>
This commit is contained in:
co-authored by
Wyatt Verchere
parent
6965487b56
commit
b9a3a6dc11
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* All theseus API calls return serialized values (both return values and errors);
|
||||
* So, for example, addDefaultInstance creates a blank Profile object, where the Rust struct is serialized,
|
||||
* and deserialized into a usable JS object.
|
||||
*/
|
||||
import { invoke } from '@tauri-apps/api/tauri'
|
||||
|
||||
// Installs pack from a version ID
|
||||
export async function install(version_id) {
|
||||
return await invoke('pack_install_version_id', version_id)
|
||||
}
|
||||
|
||||
// Installs pack from a path
|
||||
export async function install_from_file(path) {
|
||||
return await invoke('pack_install_file', path)
|
||||
}
|
||||
Reference in New Issue
Block a user