Switch to git dep so build system will work
Some checks failed
Cargo Build & Test / Rust project - latest (stable) (push) Failing after 22s
Some checks failed
Cargo Build & Test / Rust project - latest (stable) (push) Failing after 22s
This commit is contained in:
13
src/admin.rs
13
src/admin.rs
@@ -115,12 +115,13 @@ impl<'r> FromRequest<'r> for InitialSetup {
|
||||
.await
|
||||
.map_error(|_| InitialSetupError::InternalError)
|
||||
);
|
||||
let user_count = try_outcome!(
|
||||
sqlx::query!("SELECT count(name) as count from users")
|
||||
.fetch_one(&mut **db)
|
||||
.await
|
||||
.into()
|
||||
);
|
||||
let user_count = match sqlx::query!("SELECT count(name) as count from users")
|
||||
.fetch_one(&mut **db)
|
||||
.await
|
||||
{
|
||||
Ok(v) => v,
|
||||
Err(e) => return Outcome::Error(e.into()),
|
||||
};
|
||||
if user_count.count == 0 {
|
||||
Outcome::Success(Self)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user