Skip to content

Commit

Permalink
Various improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Myers <[email protected]>
  • Loading branch information
Elizafox committed Mar 14, 2024
1 parent d790de5 commit ab32030
Show file tree
Hide file tree
Showing 18 changed files with 666 additions and 56 deletions.
61 changes: 52 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ clap = { version = "4.5.2", features = ["cargo", "derive", "unicode"] }
csrf = "0.4.1"
dotenvy = "0.15.7"
envy = "0.4.2"
heck = { version = "0.4.1", features = ["unicode"] }
heck = "0.5.0"
ipnetwork = "0.20.0"
itertools = "0.12.1"
lazy_static = "1.4.0"
num = "0.4.1"
once_cell = { version = "1.19.0", features = ["parking_lot"] }
password-auth = "1.0.0"
proctitle = "0.1.1"
Expand All @@ -77,7 +79,7 @@ sea-orm = { version = "1.0.0-rc.1", features = ["macros", "runtime-tokio-native-
sea-query = { version = "0.31.0-rc.4", features = ["thread-safe", "with-time"] }
serde = { version = "1.0.197", features = ["derive"] }
thiserror = "1.0.58"
time = "0.3.34"
time = { version = "0.3.34", features = ["local-offset"] }
tokio = { version = "1.36.0", features = ["macros", "parking_lot", "rt-multi-thread", "signal", "time"] }
tracing = { version = "0.1.40", features = ["async-await", "log"] }
tracing-subscriber = { version = "0.3.18", features = ["local-time", "parking_lot", "time"] }
Expand Down
2 changes: 1 addition & 1 deletion entity/src/cidr_ban.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct Model {
#[sea_orm(column_type = "Binary(16)", unique)]
pub range_end: Vec<u8>,
pub reason: Option<String>,
pub created_at: DateTime,
pub created_at: TimeDateTimeWithTimeZone,
pub user_created_id: Option<i64>,
}

Expand Down
2 changes: 1 addition & 1 deletion entity/src/url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct Model {
pub id: i64,
pub url: String,
pub shady: String,
pub created_at: DateTime,
pub created_at: TimeDateTimeWithTimeZone,
pub ip: Option<String>,
}

Expand Down
2 changes: 1 addition & 1 deletion entity/src/url_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct Model {
#[sea_orm(unique)]
pub filter: String,
pub reason: Option<String>,
pub created_at: DateTime,
pub created_at: TimeDateTimeWithTimeZone,
pub user_created_id: Option<i64>,
}

Expand Down
3 changes: 2 additions & 1 deletion env_example
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ IP_SOURCE="RightmostXForwardedFor"
#
# Be sure to run from the source dir:
# . ./.env && sea-orm-cli migrate -u "$DATABASE_URL" up
DATABASE_URL="sqlite:/tmp/test.db"
DATABASE_URL="postgresql://localhost/shadyurl"
#DATABASE_URL="sqlite:/tmp/test.db"

# Redis URL, must start with redis:// as below.
REDIS_URL="redis://127.0.0.1"
Expand Down
Loading

0 comments on commit ab32030

Please sign in to comment.