Files
AstralRinth/theseus_gui/src/helpers/pack.js
Geometrically ee61951698 Initial bug fixes (#127)
* Initial bug fixes

* fix compile error on non-mac

* Fix even more bugs

* Fix more

* fix more

* fix build

* fix build

* address review comments
2023-06-02 07:09:46 -07:00

17 lines
634 B
JavaScript

/**
* 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(projectId, versionId, packTitle, packIcon) {
return await invoke('pack_install_version_id', { projectId, versionId, packTitle, packIcon })
}
// Installs pack from a path
export async function install_from_file(path) {
return await invoke('pack_install_file', { path })
}