remove unused extension
This commit is contained in:
		
							parent
							
								
									7b75447501
								
							
						
					
					
						commit
						bf9e511789
					
				
					 4 changed files with 0 additions and 12 deletions
				
			
		|  | @ -27,7 +27,6 @@ use askama::Template; | |||
| use asklyphe_common::nats; | ||||
| use asklyphe_common::nats::comms; | ||||
| use asklyphe_common::nats::searchservice::{SearchSrvcQuery, SearchSrvcRequest, SearchSrvcResponse}; | ||||
| use asklyphe_common::rustflake::Snowflake; | ||||
| use async_nats::jetstream; | ||||
| use axum::{Extension, Router}; | ||||
| use axum::extract::Query; | ||||
|  | @ -101,12 +100,6 @@ async fn main() { | |||
|         emergency: env::var("EMERGENCY").unwrap_or("0".to_string()).eq("1"), | ||||
|     }; | ||||
| 
 | ||||
|     let mut snowflake_factory = Snowflake { | ||||
|         worker_id: process::id() as i64, | ||||
|         datacenter_id: opts.datacenter_id, | ||||
|         ..Default::default() | ||||
|     }; | ||||
| 
 | ||||
|     if opts.loki_addr.is_some() { | ||||
|         //let (layer, task) = tracing_loki::builder()
 | ||||
|         //    .label("environment", "dev").unwrap()
 | ||||
|  | @ -155,7 +148,6 @@ async fn main() { | |||
|         .route("/admin/allusers", get(admin_user_list)) | ||||
|         .route("/announcements/:slug", get(announcement_full)) | ||||
|         .layer(CorsLayer::new().allow_methods([Method::GET, Method::POST]).allow_origin(AllowOrigin::exact(HeaderValue::from_str("localhost").unwrap()))) | ||||
|         .layer(Extension(Arc::new(Mutex::new(snowflake_factory)))) | ||||
|         .layer(Extension(nats.clone())) | ||||
|         .layer(Extension(opts.clone())) | ||||
|         .fallback(routes::not_found); | ||||
|  |  | |||
|  | @ -21,7 +21,6 @@ use asklyphe_common::nats::authservice::announcements::{LatestAnnouncementReques | |||
| use asklyphe_common::nats::authservice::profile::{UserInfoRequest, UserInfoResponse}; | ||||
| use asklyphe_common::nats::comms; | ||||
| use asklyphe_common::nats::comms::{ServiceError, ServiceResponse}; | ||||
| use asklyphe_common::rustflake::Snowflake; | ||||
| use async_nats::jetstream; | ||||
| use axum::Extension; | ||||
| use axum::response::Redirect; | ||||
|  |  | |||
|  | @ -27,7 +27,6 @@ use asklyphe_common::nats::comms; | |||
| use asklyphe_common::nats::searchservice::{ | ||||
|     SearchSrvcQuery, SearchSrvcRequest, SearchSrvcResponse, | ||||
| }; | ||||
| use asklyphe_common::rustflake::Snowflake; | ||||
| use async_nats::jetstream; | ||||
| use axum::extract::Query; | ||||
| use axum::http::StatusCode; | ||||
|  | @ -337,7 +336,6 @@ struct SearchJson { | |||
| pub async fn search_json( | ||||
|     jar: CookieJar, | ||||
|     Query(params): Query<HashMap<String, String>>, | ||||
|     Extension(_snowflake_factory): Extension<Arc<Mutex<Snowflake>>>, | ||||
|     Extension(nats): Extension<Arc<jetstream::Context>>, | ||||
|     Extension(opts): Extension<Opts>, | ||||
| ) -> String { | ||||
|  |  | |||
|  | @ -19,7 +19,6 @@ use asklyphe_common::nats::authservice::{AuthError, AuthRequest, AuthResponse, A | |||
| use asklyphe_common::nats::authservice::profile::{ThemeChangeRequest, ThemeChangeResponse, UserInfoRequest, UserInfoResponse}; | ||||
| use asklyphe_common::nats::comms; | ||||
| use asklyphe_common::nats::comms::{ServiceError, ServiceResponse}; | ||||
| use asklyphe_common::rustflake::Snowflake; | ||||
| use async_nats::jetstream; | ||||
| use axum::{Extension, Form}; | ||||
| use axum::response::Redirect; | ||||
|  |  | |||
		Reference in a new issue