Compare commits
No commits in common. "47b72f6f04032b114a1031392f44fc1f9ff23553" and "ab5b2a4ac7dd99d922f37d6cd7509ddea5feb467" have entirely different histories.
47b72f6f04
...
ab5b2a4ac7
7 changed files with 17 additions and 728 deletions
|
@ -1,5 +0,0 @@
|
||||||
vim.g.dbs = {
|
|
||||||
dev = "sqlite:testing.db",
|
|
||||||
}
|
|
||||||
|
|
||||||
return {}
|
|
10
.sqlfluff
10
.sqlfluff
|
@ -1,10 +0,0 @@
|
||||||
[sqlfluff]
|
|
||||||
dialect = sqlite
|
|
||||||
|
|
||||||
[sqlfluff:layout:type:column_constraint_segment]
|
|
||||||
spacing_before = align
|
|
||||||
align_within = create_table_statement
|
|
||||||
|
|
||||||
[sqlfluff:layout:type:data_type]
|
|
||||||
spacing_before = align
|
|
||||||
align_within = create_table_statement
|
|
717
Cargo.lock
generated
717
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -38,7 +38,6 @@ tower = { version = "0.5.0", features = ["util"] }
|
||||||
tower-http = { version = "0.5.0", features = ["fs", "trace", "limit"] }
|
tower-http = { version = "0.5.0", features = ["fs", "trace", "limit"] }
|
||||||
tracing = "0.1.37"
|
tracing = "0.1.37"
|
||||||
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
|
||||||
sqlx = { version = "0.8.2", features = ["runtime-tokio", "chrono"] }
|
|
||||||
|
|
||||||
# I want to use askama's block feature, this requires unreleased 0.13
|
# I want to use askama's block feature, this requires unreleased 0.13
|
||||||
[dependencies.askama]
|
[dependencies.askama]
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
-- Add down migration script here
|
|
||||||
DROP TABLE IF EXISTS records;
|
|
|
@ -1,8 +0,0 @@
|
||||||
-- Add up migration script here
|
|
||||||
CREATE TABLE IF NOT EXISTS records (
|
|
||||||
id INTEGER PRIMARY KEY,
|
|
||||||
uploaded TEXT NOT NULL,
|
|
||||||
file_path TEXT NOT NULL,
|
|
||||||
downloads INTEGER NOT NULL DEFAULT 0,
|
|
||||||
max_downloads INTEGER NOT NULL
|
|
||||||
) STRICT;
|
|
|
@ -74,8 +74,8 @@ async fn upload_to_zip(
|
||||||
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?;
|
.map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let record = UploadRecord::new(archive_path);
|
|
||||||
let mut records = state.records.lock().await;
|
let mut records = state.records.lock().await;
|
||||||
|
let record = UploadRecord::new(archive_path);
|
||||||
records.insert(cache_name.clone(), record.clone());
|
records.insert(cache_name.clone(), record.clone());
|
||||||
|
|
||||||
let records_cache = records.clone();
|
let records_cache = records.clone();
|
||||||
|
|
Loading…
Reference in a new issue