use tauri::{command, AppHandle, Runtime};

use crate::models::*;
use crate::IosSharedTokenExt;
use crate::Result;

#[command]
pub(crate) async fn save_token<R: Runtime>(
    app: AppHandle<R>,
    payload: SaveTokenRequest,
) -> Result<SaveTokenResponse> {
    app.ios_shared_token().save_token(payload)
}
