use actix_web::{error::ErrorBadRequest, web, Error, HttpResponse, Result};
use anyhow::anyhow;
use lemmy_api_common::context::LemmyContext;
-use lemmy_db_schema::source::local_site::RegistrationMode;
+use lemmy_db_schema::RegistrationMode;
use lemmy_db_views::structs::SiteView;
use lemmy_utils::{error::LemmyError, version};
use serde::{Deserialize, Serialize};
}
async fn node_info(context: web::Data<LemmyContext>) -> Result<HttpResponse, Error> {
- let site_view = SiteView::read_local(context.pool())
+ let site_view = SiteView::read_local(&mut context.pool())
.await
.map_err(|_| ErrorBadRequest(LemmyError::from(anyhow!("not_found"))))?;