};
use lemmy_api::match_websocket_operation;
use lemmy_api_common::blocking;
+use lemmy_api_crud::match_websocket_operation_crud;
use lemmy_apub::activity_queue::create_activity_queue;
use lemmy_db_queries::get_database_url_from_env;
use lemmy_routes::{feeds, images, nodeinfo, webfinger};
-use lemmy_server::{code_migrations::run_advanced_migrations, scheduled_tasks};
+use lemmy_server::{api_routes, code_migrations::run_advanced_migrations, scheduled_tasks};
use lemmy_utils::{
rate_limit::{rate_limiter::RateLimiter, RateLimit},
settings::structs::Settings,
pool.clone(),
rate_limiter.clone(),
|c, i, o, d| Box::pin(match_websocket_operation(c, i, o, d)),
+ |c, i, o, d| Box::pin(match_websocket_operation_crud(c, i, o, d)),
Client::default(),
activity_queue.clone(),
)
.wrap(middleware::Logger::default())
.data(context)
// The routes
- .configure(|cfg| lemmy_api_crud::routes::config(cfg, &rate_limiter))
- .configure(|cfg| lemmy_api::routes::config(cfg, &rate_limiter))
+ .configure(|cfg| api_routes::config(cfg, &rate_limiter))
+ .configure(lemmy_websocket::routes::config)
.configure(lemmy_apub::routes::config)
.configure(feeds::config)
.configure(|cfg| images::config(cfg, &rate_limiter))