Skip to content

Commit

Permalink
fix: forgot roblox_api.rs to save :/
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon4ik committed Jul 17, 2024
1 parent d975eac commit e398314
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src-tauri/src/roblox_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,25 @@ fn open_place<R: Runtime>(app: AppHandle<R>, place_id: u64) -> Result<(), String
Ok(())
}

#[tauri::command]
fn open_server<R: Runtime>(
app: AppHandle<R>,
place_id: u64,
game_id: String,
) -> Result<(), String> {
api::shell::open(
&app.shell_scope(),
format!(
"roblox://experiences/start?placeId={}&gameInstanceId={}",
place_id, game_id
),
None,
)
.map_err(|err| err.to_string())?;

Ok(())
}

pub fn init<R: Runtime>() -> TauriPlugin<R> {
Builder::new("roblox-api")
.invoke_handler(tauri::generate_handler![
Expand Down

0 comments on commit e398314

Please sign in to comment.