mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-11 04:25:55 +00:00
Fix lib.rs
This commit is contained in:
parent
9ec77d041e
commit
28116f8a5a
1 changed files with 3 additions and 4 deletions
|
@ -53,18 +53,17 @@ pub async fn start_lemmy_server() -> Result<(), LemmyError> {
|
|||
|
||||
// Set up the connection pool
|
||||
let pool = build_db_pool(&settings).await?;
|
||||
let mut conn = get_conn(&pool).await?;
|
||||
|
||||
// Run the Code-required migrations
|
||||
run_advanced_migrations(&mut *conn, &settings).await?;
|
||||
run_advanced_migrations(get_conn(pool).await?, &settings).await?;
|
||||
|
||||
// Initialize the secrets
|
||||
let secret = Secret::init(&mut *conn)
|
||||
let secret = Secret::init(get_conn(pool).await?)
|
||||
.await
|
||||
.expect("Couldn't initialize secrets.");
|
||||
|
||||
// Make sure the local site is set up.
|
||||
let site_view = SiteView::read_local(&mut *conn)
|
||||
let site_view = SiteView::read_local(get_conn(pool).await?)
|
||||
.await
|
||||
.expect("local site not set up");
|
||||
let local_site = site_view.local_site;
|
||||
|
|
Loading…
Reference in a new issue