mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-22 05:34:04 +02:00
fixed database query
This commit is contained in:
parent
f3834f20c5
commit
4954e374fe
2 changed files with 9 additions and 1 deletions
|
@ -45,8 +45,9 @@ pub fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
|
|||
.take(16)
|
||||
.map(char::from)
|
||||
.collect();
|
||||
sqlx::query("INSERT INTO history (id, content_type, content) VALUES (?, text, ?)")
|
||||
sqlx::query("INSERT INTO history (id, content_type, content) VALUES (?, ?, ?)")
|
||||
.bind(id)
|
||||
.bind("text")
|
||||
.bind("Welcome to your clipboard history!")
|
||||
.execute(&pool)
|
||||
.await
|
||||
|
|
|
@ -35,6 +35,13 @@ fn main() {
|
|||
window.show().unwrap();
|
||||
}
|
||||
|
||||
#[cfg(dev)]
|
||||
{
|
||||
let window = app.get_webview_window("main").unwrap();
|
||||
window.open_devtools();
|
||||
window.close_devtools();
|
||||
}
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.on_window_event(|app, event| match event {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue