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; | ||||||
| use asklyphe_common::nats::comms; | use asklyphe_common::nats::comms; | ||||||
| use asklyphe_common::nats::searchservice::{SearchSrvcQuery, SearchSrvcRequest, SearchSrvcResponse}; | use asklyphe_common::nats::searchservice::{SearchSrvcQuery, SearchSrvcRequest, SearchSrvcResponse}; | ||||||
| use asklyphe_common::rustflake::Snowflake; |  | ||||||
| use async_nats::jetstream; | use async_nats::jetstream; | ||||||
| use axum::{Extension, Router}; | use axum::{Extension, Router}; | ||||||
| use axum::extract::Query; | use axum::extract::Query; | ||||||
|  | @ -101,12 +100,6 @@ async fn main() { | ||||||
|         emergency: env::var("EMERGENCY").unwrap_or("0".to_string()).eq("1"), |         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() { |     if opts.loki_addr.is_some() { | ||||||
|         //let (layer, task) = tracing_loki::builder()
 |         //let (layer, task) = tracing_loki::builder()
 | ||||||
|         //    .label("environment", "dev").unwrap()
 |         //    .label("environment", "dev").unwrap()
 | ||||||
|  | @ -155,7 +148,6 @@ async fn main() { | ||||||
|         .route("/admin/allusers", get(admin_user_list)) |         .route("/admin/allusers", get(admin_user_list)) | ||||||
|         .route("/announcements/:slug", get(announcement_full)) |         .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(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(nats.clone())) | ||||||
|         .layer(Extension(opts.clone())) |         .layer(Extension(opts.clone())) | ||||||
|         .fallback(routes::not_found); |         .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::authservice::profile::{UserInfoRequest, UserInfoResponse}; | ||||||
| use asklyphe_common::nats::comms; | use asklyphe_common::nats::comms; | ||||||
| use asklyphe_common::nats::comms::{ServiceError, ServiceResponse}; | use asklyphe_common::nats::comms::{ServiceError, ServiceResponse}; | ||||||
| use asklyphe_common::rustflake::Snowflake; |  | ||||||
| use async_nats::jetstream; | use async_nats::jetstream; | ||||||
| use axum::Extension; | use axum::Extension; | ||||||
| use axum::response::Redirect; | use axum::response::Redirect; | ||||||
|  |  | ||||||
|  | @ -27,7 +27,6 @@ use asklyphe_common::nats::comms; | ||||||
| use asklyphe_common::nats::searchservice::{ | use asklyphe_common::nats::searchservice::{ | ||||||
|     SearchSrvcQuery, SearchSrvcRequest, SearchSrvcResponse, |     SearchSrvcQuery, SearchSrvcRequest, SearchSrvcResponse, | ||||||
| }; | }; | ||||||
| use asklyphe_common::rustflake::Snowflake; |  | ||||||
| use async_nats::jetstream; | use async_nats::jetstream; | ||||||
| use axum::extract::Query; | use axum::extract::Query; | ||||||
| use axum::http::StatusCode; | use axum::http::StatusCode; | ||||||
|  | @ -337,7 +336,6 @@ struct SearchJson { | ||||||
| pub async fn search_json( | pub async fn search_json( | ||||||
|     jar: CookieJar, |     jar: CookieJar, | ||||||
|     Query(params): Query<HashMap<String, String>>, |     Query(params): Query<HashMap<String, String>>, | ||||||
|     Extension(_snowflake_factory): Extension<Arc<Mutex<Snowflake>>>, |  | ||||||
|     Extension(nats): Extension<Arc<jetstream::Context>>, |     Extension(nats): Extension<Arc<jetstream::Context>>, | ||||||
|     Extension(opts): Extension<Opts>, |     Extension(opts): Extension<Opts>, | ||||||
| ) -> String { | ) -> 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::authservice::profile::{ThemeChangeRequest, ThemeChangeResponse, UserInfoRequest, UserInfoResponse}; | ||||||
| use asklyphe_common::nats::comms; | use asklyphe_common::nats::comms; | ||||||
| use asklyphe_common::nats::comms::{ServiceError, ServiceResponse}; | use asklyphe_common::nats::comms::{ServiceError, ServiceResponse}; | ||||||
| use asklyphe_common::rustflake::Snowflake; |  | ||||||
| use async_nats::jetstream; | use async_nats::jetstream; | ||||||
| use axum::{Extension, Form}; | use axum::{Extension, Form}; | ||||||
| use axum::response::Redirect; | use axum::response::Redirect; | ||||||
|  |  | ||||||
		Reference in a new issue