broken! feat: sqlx query get
This commit is contained in:
parent
47bc1b6016
commit
88bdfdfc87
1 changed files with 13 additions and 0 deletions
|
@ -75,6 +75,19 @@ async fn upload_to_zip(
|
|||
|
||||
let record = UploadRecord::new(archive_path);
|
||||
let mut records = state.records.lock().await;
|
||||
|
||||
if let Some(mut conn) = state.pool.try_acquire() {
|
||||
let path = record.file.clone().into_os_string().into_string().unwrap();
|
||||
|
||||
let id = sqlx::query_file!("queries/records/new.sql", path, 5)
|
||||
.execute(&mut *conn)
|
||||
.await
|
||||
.unwrap()
|
||||
.last_insert_rowid();
|
||||
|
||||
// TODO: Looks like I actually gotta store cache_name lmfao
|
||||
};
|
||||
|
||||
records.insert(cache_name.clone(), record.clone());
|
||||
|
||||
let records_cache = records.clone();
|
||||
|
|
Loading…
Reference in a new issue