You've already forked AstralRinth
forked from didirus/AstralRinth
Debug pin macro (#118)
* debug pin macro * Added debug pinning macro * working on windows * removed remaining box pins
This commit is contained in:
@@ -4,6 +4,7 @@ use theseus::prelude::*;
|
||||
/// Authenticate a user with Hydra - part 1
|
||||
/// This begins the authentication flow quasi-synchronously, returning a URL to visit (that the user will sign in at)
|
||||
#[tauri::command]
|
||||
#[theseus_macros::debug_pin]
|
||||
pub async fn auth_authenticate_begin_flow() -> Result<url::Url> {
|
||||
Ok(auth::authenticate_begin_flow().await?)
|
||||
}
|
||||
@@ -12,6 +13,7 @@ pub async fn auth_authenticate_begin_flow() -> Result<url::Url> {
|
||||
/// This completes the authentication flow quasi-synchronously, returning the sign-in credentials
|
||||
/// (and also adding the credentials to the state)
|
||||
#[tauri::command]
|
||||
#[theseus_macros::debug_pin]
|
||||
pub async fn auth_authenticate_await_completion() -> Result<Credentials> {
|
||||
Ok(auth::authenticate_await_complete_flow().await?)
|
||||
}
|
||||
@@ -19,13 +21,13 @@ pub async fn auth_authenticate_await_completion() -> Result<Credentials> {
|
||||
/// Refresh some credentials using Hydra, if needed
|
||||
// invoke('auth_refresh',user)
|
||||
#[tauri::command]
|
||||
#[theseus_macros::debug_pin]
|
||||
pub async fn auth_refresh(user: uuid::Uuid) -> Result<Credentials> {
|
||||
Ok(auth::refresh(user).await?)
|
||||
}
|
||||
|
||||
/// Remove a user account from the database
|
||||
// invoke('auth_remove_user',user)
|
||||
#[tauri::command]
|
||||
#[theseus_macros::debug_pin]
|
||||
pub async fn auth_remove_user(user: uuid::Uuid) -> Result<()> {
|
||||
Ok(auth::remove_user(user).await?)
|
||||
}
|
||||
@@ -33,6 +35,7 @@ pub async fn auth_remove_user(user: uuid::Uuid) -> Result<()> {
|
||||
/// Check if a user exists in Theseus
|
||||
// invoke('auth_has_user',user)
|
||||
#[tauri::command]
|
||||
#[theseus_macros::debug_pin]
|
||||
pub async fn auth_has_user(user: uuid::Uuid) -> Result<bool> {
|
||||
Ok(auth::has_user(user).await?)
|
||||
}
|
||||
@@ -40,6 +43,7 @@ pub async fn auth_has_user(user: uuid::Uuid) -> Result<bool> {
|
||||
/// Get a copy of the list of all user credentials
|
||||
// invoke('auth_users',user)
|
||||
#[tauri::command]
|
||||
#[theseus_macros::debug_pin]
|
||||
pub async fn auth_users() -> Result<Vec<Credentials>> {
|
||||
Ok(auth::users().await?)
|
||||
}
|
||||
@@ -48,6 +52,7 @@ pub async fn auth_users() -> Result<Vec<Credentials>> {
|
||||
/// Prefer to use refresh instead, as it will refresh the credentials as well
|
||||
// invoke('auth_users',user)
|
||||
#[tauri::command]
|
||||
#[theseus_macros::debug_pin]
|
||||
pub async fn auth_get_user(user: uuid::Uuid) -> Result<Credentials> {
|
||||
Ok(auth::get_user(user).await?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user