Fix SQLX errors
This commit is contained in:
parent
0efeffeaa3
commit
b8d2ef1eb5
1087
Cargo.lock
generated
1087
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
12
Cargo.toml
12
Cargo.toml
@ -43,14 +43,4 @@ futures-timer = "3.0.2"
|
||||
rust-s3 = "0.26.1"
|
||||
async-trait = "0.1.41"
|
||||
|
||||
[dependencies.sqlx]
|
||||
git = "https://github.com/launchbadge/sqlx/"
|
||||
branch = "master"
|
||||
default-features = false
|
||||
features = ["runtime-actix", "postgres", "chrono", "offline", "macros", "migrate"]
|
||||
|
||||
[dependencies.sqlx-macros]
|
||||
git = "https://github.com/launchbadge/sqlx/"
|
||||
branch = "master"
|
||||
default-features = false
|
||||
features = ["runtime-actix", "postgres", "chrono", "offline"]
|
||||
sqlx = { version = "0.4.2", features = ["runtime-actix-rustls", "postgres", "chrono", "offline", "macros", "migrate"] }
|
||||
@ -1,6 +1,6 @@
|
||||
use super::DatabaseError;
|
||||
use crate::models::ids::random_base62_rng;
|
||||
use sqlx_macros::Type;
|
||||
use sqlx::sqlx_macros::Type;
|
||||
|
||||
const ID_RETRY_COUNT: usize = 20;
|
||||
|
||||
|
||||
@ -264,7 +264,7 @@ async fn main() -> std::io::Result<()> {
|
||||
let ignore_ips = dotenv::var("RATE_LIMIT_IGNORE_IPS")
|
||||
.ok()
|
||||
.and_then(|s| serde_json::from_str::<Vec<String>>(&s).ok())
|
||||
.unwrap_or_else(|| vec![]);
|
||||
.unwrap_or(vec![]);
|
||||
|
||||
if ignore_ips.contains(&ip) {
|
||||
// At an even distribution of numbers, this will allow at the most
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user