mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-29 15:51:20 +00:00
Fix app_data
This commit is contained in:
parent
3f013fbce5
commit
acbc12aac4
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
extern crate diesel_migrations;
|
extern crate diesel_migrations;
|
||||||
|
|
||||||
use actix::prelude::*;
|
use actix::prelude::*;
|
||||||
use actix_web::*;
|
use actix_web::{web::Data, *};
|
||||||
use diesel::{
|
use diesel::{
|
||||||
r2d2::{ConnectionManager, Pool},
|
r2d2::{ConnectionManager, Pool},
|
||||||
PgConnection,
|
PgConnection,
|
||||||
|
@ -88,7 +88,7 @@ async fn main() -> Result<(), LemmyError> {
|
||||||
let rate_limiter = rate_limiter.clone();
|
let rate_limiter = rate_limiter.clone();
|
||||||
App::new()
|
App::new()
|
||||||
.wrap(middleware::Logger::default())
|
.wrap(middleware::Logger::default())
|
||||||
.app_data(context)
|
.app_data(Data::new(context))
|
||||||
// The routes
|
// The routes
|
||||||
.configure(|cfg| api_routes::config(cfg, &rate_limiter))
|
.configure(|cfg| api_routes::config(cfg, &rate_limiter))
|
||||||
.configure(lemmy_apub_receive::routes::config)
|
.configure(lemmy_apub_receive::routes::config)
|
||||||
|
|
Loading…
Reference in a new issue