fix: remove surrealdb and clean up

This commit is contained in:
2024-02-05 07:46:41 +07:00
parent 3ba870be4b
commit 7bd6f6a8db
7 changed files with 11 additions and 1650 deletions

View File

@@ -1,23 +0,0 @@
use crate::model::*;
use crate::AppState;
use tauri::State;
#[tauri::command(async)]
pub async fn create_account(
pubkey: String,
app_state: State<'_, AppState>,
) -> Result<Vec<Record>, ()> {
let db = app_state.db.lock().await;
let created: Vec<Record> = db
.create("account")
.content(Account {
id: None,
pubkey,
is_active: true,
})
.await
.expect("Create account failed");
Ok(created)
}