You've already forked AstralRinth
forked from didirus/AstralRinth
Fix SQLX errors
This commit is contained in:
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"
|
rust-s3 = "0.26.1"
|
||||||
async-trait = "0.1.41"
|
async-trait = "0.1.41"
|
||||||
|
|
||||||
[dependencies.sqlx]
|
sqlx = { version = "0.4.2", features = ["runtime-actix-rustls", "postgres", "chrono", "offline", "macros", "migrate"] }
|
||||||
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"]
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
use super::DatabaseError;
|
use super::DatabaseError;
|
||||||
use crate::models::ids::random_base62_rng;
|
use crate::models::ids::random_base62_rng;
|
||||||
use sqlx_macros::Type;
|
use sqlx::sqlx_macros::Type;
|
||||||
|
|
||||||
const ID_RETRY_COUNT: usize = 20;
|
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")
|
let ignore_ips = dotenv::var("RATE_LIMIT_IGNORE_IPS")
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|s| serde_json::from_str::<Vec<String>>(&s).ok())
|
.and_then(|s| serde_json::from_str::<Vec<String>>(&s).ok())
|
||||||
.unwrap_or_else(|| vec![]);
|
.unwrap_or(vec![]);
|
||||||
|
|
||||||
if ignore_ips.contains(&ip) {
|
if ignore_ips.contains(&ip) {
|
||||||
// At an even distribution of numbers, this will allow at the most
|
// At an even distribution of numbers, this will allow at the most
|
||||||
|
|||||||
Reference in New Issue
Block a user