mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-21 13:14: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)
|
.take(16)
|
||||||
.map(char::from)
|
.map(char::from)
|
||||||
.collect();
|
.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(id)
|
||||||
|
.bind("text")
|
||||||
.bind("Welcome to your clipboard history!")
|
.bind("Welcome to your clipboard history!")
|
||||||
.execute(&pool)
|
.execute(&pool)
|
||||||
.await
|
.await
|
||||||
|
|
|
@ -35,6 +35,13 @@ fn main() {
|
||||||
window.show().unwrap();
|
window.show().unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(dev)]
|
||||||
|
{
|
||||||
|
let window = app.get_webview_window("main").unwrap();
|
||||||
|
window.open_devtools();
|
||||||
|
window.close_devtools();
|
||||||
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.on_window_event(|app, event| match event {
|
.on_window_event(|app, event| match event {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue