From bbaed857d011d0c188f7bf0c5b3efffafd5dacfa Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 5 Jul 2024 20:56:00 -0400 Subject: [PATCH] move server_state into module --- crates/service/web/storyteller_web/src/api_doc_cli.rs | 8 ++------ crates/service/web/storyteller_web/src/api_doc_server.rs | 8 ++------ .../src/configs/app_startup/redis_rate_limiters.rs | 2 +- .../endpoints/analytics/log_browser_session_handler.rs | 2 +- .../endpoints/animation/enqueue_face_animation.rs | 2 +- .../endpoints/animation/enqueue_rerender_animation.rs | 2 +- .../http_server/endpoints/api_tokens/create_api_token.rs | 2 +- .../http_server/endpoints/api_tokens/delete_api_token.rs | 2 +- .../http_server/endpoints/api_tokens/edit_api_token.rs | 2 +- .../http_server/endpoints/api_tokens/list_api_tokens.rs | 2 +- .../endpoints/beta_keys/create_beta_keys_handler.rs | 2 +- .../beta_keys/edit_beta_key_distributed_flag_handler.rs | 2 +- .../endpoints/beta_keys/edit_beta_key_note_handler.rs | 2 +- .../endpoints/beta_keys/list_beta_keys_handler.rs | 2 +- .../endpoints/beta_keys/redeem_beta_key_handler.rs | 2 +- .../http_server/endpoints/categories/create_category.rs | 2 +- .../src/http_server/endpoints/categories/get_category.rs | 2 +- .../endpoints/categories/tts/assign_tts_category.rs | 2 +- .../list_fully_computed_assigned_tts_categories.rs | 2 +- .../endpoints/categories/tts/list_tts_categories.rs | 2 +- .../categories/tts/list_tts_model_assigned_categories.rs | 2 +- .../endpoints/comments/create_comment_handler.rs | 2 +- .../endpoints/comments/delete_comment_handler.rs | 2 +- .../endpoints/comments/list_comments_handler.rs | 2 +- .../endpoints/conversion/enqueue_fbx_to_gltf_handler.rs | 2 +- .../enqueue_render_engine_scene_to_video_handler.rs | 2 +- .../endpoints/download_job/enqueue_generic_download.rs | 2 +- .../download_job/get_generic_upload_job_status.rs | 2 +- .../http_server/endpoints/engine/create_scene_handler.rs | 2 +- .../src/http_server/endpoints/engine/get_scene_handler.rs | 2 +- .../endpoints/engine/process_upload_media_file.rs | 2 +- .../http_server/endpoints/engine/update_scene_handler.rs | 2 +- .../src/http_server/endpoints/events/list_events.rs | 2 +- .../featured_items/create_featured_item_handler.rs | 2 +- .../featured_items/delete_featured_item_handler.rs | 2 +- .../featured_items/get_is_featured_item_handler.rs | 2 +- .../design_refresh_flag/build_design_refresh_cookie.rs | 2 +- .../endpoints/image_gen/enqueue_image_generation.rs | 2 +- .../batch_get_inference_job_status_handler.rs | 2 +- .../dismiss_finished_session_jobs_handler.rs | 2 +- .../inference_job/get_inference_job_status_handler.rs | 2 +- .../inference_job/kill_inference_jobs_handler.rs | 2 +- .../endpoints/inference_job/list_session_jobs_handler.rs | 2 +- .../inference_job/terminate_inference_job_handler.rs | 2 +- .../endpoints/investor_demo/disable_demo_mode_handler.rs | 2 +- .../endpoints/investor_demo/enable_demo_mode_handler.rs | 2 +- .../http_server/endpoints/leaderboard/get_leaderboard.rs | 2 +- .../media_files/delete/delete_media_file_handler.rs | 2 +- .../edit/change_media_file_visibility_handler.rs | 2 +- .../media_files/edit/rename_media_file_handler.rs | 2 +- .../edit/set_media_file_cover_image_handler.rs | 2 +- .../media_files/edit/update_media_file_handler.rs | 2 +- .../media_files/get/batch_get_media_files_handler.rs | 2 +- .../endpoints/media_files/get/get_media_file_handler.rs | 2 +- .../media_files/list/list_featured_media_files_handler.rs | 2 +- .../list/list_media_files_by_batch_token_handler.rs | 2 +- .../media_files/list/list_media_files_for_user_handler.rs | 2 +- .../media_files/list/list_media_files_handler.rs | 2 +- .../media_files/list/list_pinned_media_files_handler.rs | 2 +- .../search/search_featured_media_files_handler.rs | 2 +- .../search/search_session_media_files_handler.rs | 2 +- .../media_files/upload/upload_audio_media_file_handler.rs | 2 +- .../upload_engine_asset_media_file_handler.rs | 2 +- .../upload/upload_generic/process_upload_media_file.rs | 2 +- .../upload/upload_generic/upload_media_file_handler.rs | 2 +- .../media_files/upload/upload_image_media_file_handler.rs | 2 +- .../upload/upload_new_engine_asset_media_file_handler.rs | 2 +- .../upload/upload_new_scene_media_file_handler.rs | 2 +- .../upload/upload_new_video_media_file_handler.rs | 2 +- .../upload/upload_pmx/upload_pmx_media_file_handler.rs | 2 +- .../upload/upload_saved_scene_media_file_handler.rs | 2 +- .../upload/upload_scene_snapshot_media_file_handler.rs | 2 +- .../upload_video/upload_video_media_file_handler.rs | 2 +- .../write_engine_asset_media_file_handler.rs | 2 +- .../write_scene_file_media_file_handler.rs | 2 +- .../endpoints/media_uploads/common/handle_upload.rs | 2 +- .../media_uploads/list_user_media_uploads_of_type.rs | 2 +- .../http_server/endpoints/media_uploads/upload_audio.rs | 2 +- .../http_server/endpoints/media_uploads/upload_image.rs | 2 +- .../http_server/endpoints/media_uploads/upload_media.rs | 2 +- .../src/http_server/endpoints/misc/alpha_cookie.rs | 2 +- .../http_server/endpoints/misc/detect_locale_handler.rs | 2 +- .../endpoints/misc/enable_alpha_easy_handler.rs | 2 +- .../http_server/endpoints/misc/enable_alpha_handler.rs | 2 +- .../src/http_server/endpoints/misc/root_index.rs | 2 +- .../src/http_server/endpoints/mocap/enqueue_mocapnet.rs | 2 +- .../moderation/approval/pending_w2l_templates.rs | 2 +- .../endpoints/moderation/categories/delete_category.rs | 2 +- .../endpoints/moderation/categories/edit_category.rs | 2 +- .../categories/list_tts_categories_for_moderation.rs | 2 +- .../moderation/info/moderator_token_info_handler.rs | 2 +- .../endpoints/moderation/ip_bans/add_ip_ban.rs | 2 +- .../endpoints/moderation/ip_bans/delete_ip_ban.rs | 2 +- .../endpoints/moderation/ip_bans/get_ip_ban.rs | 2 +- .../endpoints/moderation/ip_bans/list_ip_bans.rs | 2 +- .../moderation/jobs/get_tts_inference_queue_count.rs | 2 +- .../moderation/jobs/get_w2l_inference_queue_count.rs | 2 +- .../endpoints/moderation/jobs/kill_tts_inference_jobs.rs | 2 +- .../endpoints/moderation/stats/get_voice_count_stats.rs | 2 +- .../endpoints/moderation/user_bans/ban_user.rs | 2 +- .../endpoints/moderation/user_bans/list_banned_users.rs | 2 +- .../user_feature_flags/edit_user_feature_flags_handler.rs | 2 +- .../endpoints/moderation/user_roles/list_roles.rs | 2 +- .../endpoints/moderation/user_roles/list_staff.rs | 2 +- .../endpoints/moderation/user_roles/set_user_role.rs | 2 +- .../http_server/endpoints/moderation/users/list_users.rs | 2 +- .../http_server/endpoints/prompts/get_prompt_handler.rs | 2 +- .../http_server/endpoints/service/health_check_handler.rs | 2 +- .../http_server/endpoints/service/public_info_handler.rs | 2 +- .../http_server/endpoints/service/status_alert_handler.rs | 2 +- .../http_server/endpoints/stubs/app_model_downloads.rs | 2 +- .../src/http_server/endpoints/stubs/app_news.rs | 2 +- .../src/http_server/endpoints/stubs/app_plans.rs | 2 +- .../src/http_server/endpoints/stubs/post_app_analytics.rs | 2 +- .../endpoints/subscriptions/unsubscribe_reason.rs | 2 +- .../endpoints/trending/list_trending_tts_models.rs | 2 +- .../src/http_server/endpoints/tts/delete_tts_model.rs | 2 +- .../src/http_server/endpoints/tts/delete_tts_result.rs | 2 +- .../src/http_server/endpoints/tts/edit_tts_model.rs | 2 +- .../src/http_server/endpoints/tts/edit_tts_result.rs | 2 +- .../enqueue_infer_tts_handler.rs | 2 +- .../http_server/endpoints/tts/enqueue_upload_tts_model.rs | 2 +- .../endpoints/tts/get_tts_inference_job_status.rs | 2 +- .../src/http_server/endpoints/tts/get_tts_model.rs | 2 +- .../http_server/endpoints/tts/get_tts_model_use_count.rs | 2 +- .../src/http_server/endpoints/tts/get_tts_result.rs | 2 +- .../endpoints/tts/get_tts_upload_model_job_status.rs | 2 +- .../src/http_server/endpoints/tts/list_tts_models.rs | 2 +- .../endpoints/tts/list_user_tts_inference_results.rs | 2 +- .../src/http_server/endpoints/tts/list_user_tts_models.rs | 2 +- .../endpoints/tts/search_tts_models_handler.rs | 2 +- .../user_bookmarks/batch_get_user_bookmarks_handler.rs | 2 +- .../user_bookmarks/create_user_bookmark_handler.rs | 2 +- .../user_bookmarks/delete_user_bookmark_handler.rs | 2 +- .../list_user_bookmarks_for_entity_handler.rs | 2 +- .../list_user_bookmarks_for_session_handler.rs | 2 +- .../list_user_bookmarks_for_user_handler.rs | 2 +- .../user_ratings/batch_get_user_rating_handler.rs | 2 +- .../endpoints/user_ratings/get_user_rating_handler.rs | 2 +- .../endpoints/user_ratings/set_user_rating_handler.rs | 2 +- .../src/http_server/endpoints/vocoders/get_vocoder.rs | 2 +- .../src/http_server/endpoints/vocoders/list_vocoders.rs | 2 +- .../check_if_voice_clone_request_submitted.rs | 2 +- .../voice_clone_requests/create_voice_clone_request.rs | 2 +- .../inference/enqueue_voice_conversion_inference.rs | 2 +- .../models/list_voice_conversion_models.rs | 2 +- .../voice_designer/inference/enqueue_tts_request.rs | 2 +- .../voice_designer/voice_dataset_samples/delete_sample.rs | 2 +- .../voice_dataset_samples/list_samples_by_dataset.rs | 2 +- .../voice_dataset_samples/upload_zs_sample.rs | 2 +- .../voice_designer/voice_datasets/create_dataset.rs | 2 +- .../voice_designer/voice_datasets/delete_dataset.rs | 2 +- .../voice_designer/voice_datasets/get_dataset.rs | 2 +- .../voice_datasets/list_datasets_by_session.rs | 2 +- .../voice_datasets/list_datasets_by_user.rs | 2 +- .../voice_designer/voice_datasets/update_dataset.rs | 2 +- .../endpoints/voice_designer/voices/create_voice.rs | 2 +- .../endpoints/voice_designer/voices/delete_voice.rs | 2 +- .../endpoints/voice_designer/voices/get_voice.rs | 2 +- .../voice_designer/voices/list_available_voices.rs | 2 +- .../voice_designer/voices/list_voices_by_session.rs | 2 +- .../voice_designer/voices/list_voices_by_user.rs | 2 +- .../endpoints/voice_designer/voices/update_voice.rs | 2 +- .../src/http_server/endpoints/w2l/delete_w2l_result.rs | 2 +- .../src/http_server/endpoints/w2l/delete_w2l_template.rs | 2 +- .../src/http_server/endpoints/w2l/edit_w2l_result.rs | 2 +- .../src/http_server/endpoints/w2l/edit_w2l_template.rs | 2 +- .../src/http_server/endpoints/w2l/enqueue_infer_w2l.rs | 2 +- .../endpoints/w2l/enqueue_infer_w2l_with_uploads.rs | 2 +- .../endpoints/w2l/enqueue_upload_w2l_template.rs | 2 +- .../endpoints/w2l/get_w2l_inference_job_status.rs | 2 +- .../src/http_server/endpoints/w2l/get_w2l_result.rs | 2 +- .../src/http_server/endpoints/w2l/get_w2l_template.rs | 2 +- .../endpoints/w2l/get_w2l_template_use_count.rs | 2 +- .../endpoints/w2l/get_w2l_upload_template_job_status.rs | 2 +- .../endpoints/w2l/list_user_w2l_inference_results.rs | 2 +- .../http_server/endpoints/w2l/list_user_w2l_templates.rs | 2 +- .../src/http_server/endpoints/w2l/list_w2l_templates.rs | 2 +- .../endpoints/w2l/set_w2l_template_mod_approval.rs | 2 +- .../endpoints/weights/delete_weight_handler.rs | 2 +- .../http_server/endpoints/weights/get_weight_handler.rs | 2 +- .../endpoints/weights/list_available_weights_handler.rs | 2 +- .../endpoints/weights/list_featured_weights_handler.rs | 2 +- .../endpoints/weights/list_pinned_weights_handler.rs | 2 +- .../endpoints/weights/list_weights_by_user_handler.rs | 2 +- .../endpoints/weights/search_model_weights_handler.rs | 2 +- .../weights/set_model_weight_cover_image_handler.rs | 2 +- .../endpoints/weights/update_weight_handler.rs | 2 +- .../endpoints/workflows/enqueue_comfy_ui_handler.rs | 2 +- .../workflows/enqueue_video_style_transfer_handler.rs | 2 +- .../workflows/enqueue_workflow_upload_request.rs | 2 +- .../http_server/middleware/pushback_filter_middleware.rs | 2 +- .../src/http_server/web_utils/require_moderator.rs | 2 +- .../src/http_server/web_utils/require_user_session.rs | 2 +- .../src/http_server/web_utils/try_delete_session_cache.rs | 2 +- crates/service/web/storyteller_web/src/main.rs | 6 +++--- crates/service/web/storyteller_web/src/state/mod.rs | 1 + .../web/storyteller_web/src/{ => state}/server_state.rs | 0 .../web/storyteller_web/src/util/allowed_studio_access.rs | 2 +- .../src/util/allowed_video_style_transfer_access.rs | 2 +- 200 files changed, 203 insertions(+), 210 deletions(-) create mode 100644 crates/service/web/storyteller_web/src/state/mod.rs rename crates/service/web/storyteller_web/src/{ => state}/server_state.rs (100%) diff --git a/crates/service/web/storyteller_web/src/api_doc_cli.rs b/crates/service/web/storyteller_web/src/api_doc_cli.rs index c007ee1fab..0a6b94dee7 100644 --- a/crates/service/web/storyteller_web/src/api_doc_cli.rs +++ b/crates/service/web/storyteller_web/src/api_doc_cli.rs @@ -32,20 +32,16 @@ use tokio::runtime::Runtime; use errors::AnyhowResult; use crate::configs::static_api_tokens::{StaticApiTokenConfig, StaticApiTokens, StaticApiTokenSet}; -use crate::server_state::{DurableInMemoryCaches, EnvConfig, EphemeralInMemoryCaches, InMemoryCaches, RedisRateLimiters, ServerInfo, ServerState, StaticFeatureFlags, StripeSettings, TrollBans}; +use crate::state::server_state::{DurableInMemoryCaches, EnvConfig, EphemeralInMemoryCaches, InMemoryCaches, RedisRateLimiters, ServerInfo, ServerState, StaticFeatureFlags, StripeSettings, TrollBans}; pub mod billing; pub mod configs; -pub mod cookies; pub mod http_server; pub mod memory_cache; pub mod model; -pub mod routes; -pub mod server_state; -pub mod subscriptions; +pub mod state; pub mod threads; pub mod util; -pub mod validations; use std::{ error::Error, diff --git a/crates/service/web/storyteller_web/src/api_doc_server.rs b/crates/service/web/storyteller_web/src/api_doc_server.rs index a302c114aa..52da786495 100644 --- a/crates/service/web/storyteller_web/src/api_doc_server.rs +++ b/crates/service/web/storyteller_web/src/api_doc_server.rs @@ -29,20 +29,16 @@ use api_doc::ApiDoc; use errors::AnyhowResult; use crate::configs::static_api_tokens::StaticApiTokenSet; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; pub mod billing; pub mod configs; -pub mod cookies; pub mod http_server; pub mod memory_cache; pub mod model; -pub mod routes; -pub mod server_state; -pub mod subscriptions; +pub mod state; pub mod threads; pub mod util; -pub mod validations; pub mod api_doc; diff --git a/crates/service/web/storyteller_web/src/configs/app_startup/redis_rate_limiters.rs b/crates/service/web/storyteller_web/src/configs/app_startup/redis_rate_limiters.rs index 76dc1d5a47..3c4cbb16c4 100644 --- a/crates/service/web/storyteller_web/src/configs/app_startup/redis_rate_limiters.rs +++ b/crates/service/web/storyteller_web/src/configs/app_startup/redis_rate_limiters.rs @@ -8,7 +8,7 @@ use limitation::Limiter; use crate::configs::app_startup::username_set::UsernameSet; use crate::http_server::web_utils::redis_rate_limiter::RedisRateLimiter; -use crate::server_state::RedisRateLimiters; +use crate::state::server_state::RedisRateLimiters; /// Build the various rate limiters pub fn configure_redis_rate_limiters(common_env: &CommonEnv) -> AnyhowResult { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/analytics/log_browser_session_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/analytics/log_browser_session_handler.rs index 1d257e4304..afb0526ea5 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/analytics/log_browser_session_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/analytics/log_browser_session_handler.rs @@ -32,7 +32,7 @@ use crate::http_server::endpoints::moderation::user_feature_flags::edit_user_fea use crate::http_server::web_utils::require_moderator::{require_moderator, RequireModeratorError}; use crate::http_server::web_utils::require_user_session::RequireUserSessionError; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct LogBrowserSessionRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/animation/enqueue_face_animation.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/animation/enqueue_face_animation.rs index bf4445f5f9..fdae11b6f7 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/animation/enqueue_face_animation.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/animation/enqueue_face_animation.rs @@ -28,7 +28,7 @@ use users_component::session::lookup::user_session_extended::UserSessionExtended use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_session; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// Debug requests can get routed to special "debug-only" workers, which can /// be used to trial new code, run debugging, etc. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/animation/enqueue_rerender_animation.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/animation/enqueue_rerender_animation.rs index ea33897a25..f426bd9e82 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/animation/enqueue_rerender_animation.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/animation/enqueue_rerender_animation.rs @@ -27,7 +27,7 @@ use users_component::session::lookup::user_session_extended::UserSessionExtended use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_session; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// Debug requests can get routed to special "debug-only" workers, which can /// be used to trial new code, run debugging, etc. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/create_api_token.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/create_api_token.rs index cc5763cade..4bc14f89f1 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/create_api_token.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/create_api_token.rs @@ -10,7 +10,7 @@ use http_server_common::request::get_request_ip::get_request_ip; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::api_tokens::create_api_token::create_api_token_for_user; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/delete_api_token.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/delete_api_token.rs index 691de90a7e..e368666f38 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/delete_api_token.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/delete_api_token.rs @@ -12,7 +12,7 @@ use http_server_common::response::serialize_as_json_error::serialize_as_json_err use mysql_queries::queries::api_tokens::delete_api_token::delete_api_token; use mysql_queries::queries::api_tokens::list_available_api_tokens_for_user::list_available_api_tokens_for_user; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/edit_api_token.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/edit_api_token.rs index 79483249af..962af5d9de 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/edit_api_token.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/edit_api_token.rs @@ -11,7 +11,7 @@ use http_server_common::response::serialize_as_json_error::serialize_as_json_err use mysql_queries::queries::api_tokens::edit_api_token::edit_api_token; use mysql_queries::queries::api_tokens::list_available_api_tokens_for_user::list_available_api_tokens_for_user; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/list_api_tokens.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/list_api_tokens.rs index 715303014a..72ea679cd8 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/list_api_tokens.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/api_tokens/list_api_tokens.rs @@ -10,7 +10,7 @@ use log::{log, warn}; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::api_tokens::list_available_api_tokens_for_user::list_available_api_tokens_for_user; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Success Response =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/create_beta_keys_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/create_beta_keys_handler.rs index e1ab2a9d02..f5b805fcc2 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/create_beta_keys_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/create_beta_keys_handler.rs @@ -29,7 +29,7 @@ use user_input_common::markdown_to_html::markdown_to_html; use crate::http_server::endpoints::moderation::user_feature_flags::edit_user_feature_flags_handler::EditUserFeatureFlagsError; use crate::http_server::web_utils::require_moderator::{require_moderator, RequireModeratorError, UseDatabase}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; const MAXIMUM_KEYS : u32 = 100; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/edit_beta_key_distributed_flag_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/edit_beta_key_distributed_flag_handler.rs index b17d55f9e3..b3838cc5cb 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/edit_beta_key_distributed_flag_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/edit_beta_key_distributed_flag_handler.rs @@ -34,7 +34,7 @@ use crate::http_server::endpoints::media_files::get::get_media_file_handler::Get use crate::http_server::endpoints::moderation::user_feature_flags::edit_user_feature_flags_handler::EditUserFeatureFlagsError; use crate::http_server::web_utils::require_moderator::{require_moderator, RequireModeratorError, UseDatabase}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/edit_beta_key_note_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/edit_beta_key_note_handler.rs index cc36da361a..51544d874b 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/edit_beta_key_note_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/edit_beta_key_note_handler.rs @@ -33,7 +33,7 @@ use crate::http_server::endpoints::media_files::get::get_media_file_handler::Get use crate::http_server::endpoints::moderation::user_feature_flags::edit_user_feature_flags_handler::EditUserFeatureFlagsError; use crate::http_server::web_utils::require_moderator::{require_moderator, RequireModeratorError, UseDatabase}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/list_beta_keys_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/list_beta_keys_handler.rs index 2dccb73730..2b85f47024 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/list_beta_keys_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/list_beta_keys_handler.rs @@ -37,7 +37,7 @@ use crate::http_server::endpoints::beta_keys::create_beta_keys_handler::CreateBe use crate::http_server::endpoints::events::list_events::ListEventsError; use crate::http_server::web_utils::require_moderator::{require_moderator, RequireModeratorError}; use crate::http_server::web_utils::require_user_session::{require_user_session, RequireUserSessionError}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_explore_media_access::allowed_explore_media_access; #[derive(Copy, Clone, Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/redeem_beta_key_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/redeem_beta_key_handler.rs index a3cab8a1e8..42742a000c 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/redeem_beta_key_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/beta_keys/redeem_beta_key_handler.rs @@ -39,7 +39,7 @@ use crate::http_server::web_utils::require_moderator::RequireModeratorError; use crate::http_server::web_utils::require_user_session::{require_user_session, RequireUserSessionError}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::try_delete_session_cache::try_delete_session_cache; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct RedeemBetaKeyRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/create_category.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/create_category.rs index f420af3cc8..6718c21e77 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/create_category.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/create_category.rs @@ -11,7 +11,7 @@ use http_server_common::response::serialize_as_json_error::serialize_as_json_err use mysql_queries::queries::model_categories::create_category::{create_category, CreateCategoryArgs}; use tokens::tokens::model_categories::ModelCategoryToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; const DEFAULT_CAN_DIRECTLY_HAVE_MODELS : bool = true; const DEFAULT_CAN_HAVE_SUBCATEGORIES : bool = false; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/get_category.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/get_category.rs index 76418dc134..7167ca1317 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/get_category.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/get_category.rs @@ -11,7 +11,7 @@ use log::{log, warn}; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::model_categories::get_category_by_token::get_category_by_token; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/assign_tts_category.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/assign_tts_category.rs index bd975df91b..e22d864fbb 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/assign_tts_category.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/assign_tts_category.rs @@ -12,7 +12,7 @@ use mysql_queries::queries::model_categories::assign_tts_category::{assign_tts_c use mysql_queries::queries::model_categories::get_category_by_token::get_category_by_token; use mysql_queries::queries::tts::tts_models::get_tts_model::get_tts_model_by_token; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_fully_computed_assigned_tts_categories/list_fully_computed_assigned_tts_categories.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_fully_computed_assigned_tts_categories/list_fully_computed_assigned_tts_categories.rs index 4e54a36e04..247957456c 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_fully_computed_assigned_tts_categories/list_fully_computed_assigned_tts_categories.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_fully_computed_assigned_tts_categories/list_fully_computed_assigned_tts_categories.rs @@ -18,7 +18,7 @@ use tokens::tokens::tts_models::TtsModelToken; use crate::http_server::endpoints::categories::tts::list_fully_computed_assigned_tts_categories::error::ListFullyComputedAssignedTtsCategoriesError; use crate::http_server::endpoints::categories::tts::list_fully_computed_assigned_tts_categories::query_and_construct_payload::query_and_construct_payload; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Success Response =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_tts_categories.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_tts_categories.rs index 7bbb9fca76..6af22f6ac5 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_tts_categories.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_tts_categories.rs @@ -19,7 +19,7 @@ use tokens::tokens::model_categories::ModelCategoryToken; use crate::model::cached_queries::list_cached_tts_categories_for_public_dropdown::list_cached_tts_categories_for_public_dropdown_db_pool; use crate::model::categories::synthetic_category_list::SYNTHETIC_CATEGORY_LIST; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Success Response =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_tts_model_assigned_categories.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_tts_model_assigned_categories.rs index 1a12cbf50d..56170861ba 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_tts_model_assigned_categories.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/categories/tts/list_tts_model_assigned_categories.rs @@ -16,7 +16,7 @@ use log::warn; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::tts::tts_category_assignments::list_assigned_tts_categories_query_builder::ListAssignedTtsCategoriesQueryBuilder; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/comments/create_comment_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/comments/create_comment_handler.rs index 5e37198575..1552604bfa 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/comments/create_comment_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/comments/create_comment_handler.rs @@ -28,7 +28,7 @@ use user_input_common::check_for_slurs::contains_slurs; use user_input_common::markdown_to_html::markdown_to_html; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct CreateCommentRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/comments/delete_comment_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/comments/delete_comment_handler.rs index 45864f1028..b2b41b40b5 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/comments/delete_comment_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/comments/delete_comment_handler.rs @@ -19,7 +19,7 @@ use tokens::tokens::comments::CommentToken; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/comments/list_comments_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/comments/list_comments_handler.rs index 8e6fce9509..17c71f038a 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/comments/list_comments_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/comments/list_comments_handler.rs @@ -24,7 +24,7 @@ use users_component::common_responses::user_avatars::default_avatar_from_usernam use users_component::common_responses::user_details_lite::{UserDefaultAvatarInfo, UserDetailsLight}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/conversion/enqueue_fbx_to_gltf_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/conversion/enqueue_fbx_to_gltf_handler.rs index ce728fff22..5f66fabd53 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/conversion/enqueue_fbx_to_gltf_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/conversion/enqueue_fbx_to_gltf_handler.rs @@ -32,7 +32,7 @@ use tokens::tokens::users::UserToken; use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_session; use crate::http_server::endpoints::workflows::enqueue_comfy_ui_handler::EnqueueComfyError; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_studio_access::allowed_studio_access; /// Debug requests can get routed to special "debug-only" workers, which can diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/conversion/enqueue_render_engine_scene_to_video_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/conversion/enqueue_render_engine_scene_to_video_handler.rs index 65c3d1578f..0ca77c8ab6 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/conversion/enqueue_render_engine_scene_to_video_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/conversion/enqueue_render_engine_scene_to_video_handler.rs @@ -32,7 +32,7 @@ use tokens::tokens::users::UserToken; use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_session; use crate::http_server::endpoints::conversion::enqueue_fbx_to_gltf_handler::EnqueueFbxToGltfRequestError; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_studio_access::allowed_studio_access; /// Debug requests can get routed to special "debug-only" workers, which can diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/download_job/enqueue_generic_download.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/download_job/enqueue_generic_download.rs index bb47e88270..1ec47359b9 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/download_job/enqueue_generic_download.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/download_job/enqueue_generic_download.rs @@ -13,7 +13,7 @@ use http_server_common::request::get_request_ip::get_request_ip; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::generic_download::web::insert_generic_download_job::{insert_generic_download_job, InsertGenericDownloadJobArgs}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_model_title::validate_model_title; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/download_job/get_generic_upload_job_status.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/download_job/get_generic_upload_job_status.rs index 5840aee6b9..ddebe44e94 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/download_job/get_generic_upload_job_status.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/download_job/get_generic_upload_job_status.rs @@ -14,7 +14,7 @@ use mysql_queries::queries::generic_download::web::get_generic_download_job_stat use redis_common::redis_keys::RedisKeys; use tokens::tokens::generic_download_jobs::DownloadJobToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/engine/create_scene_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/engine/create_scene_handler.rs index a2a750ce13..13792cfcfa 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/engine/create_scene_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/engine/create_scene_handler.rs @@ -23,7 +23,7 @@ use mysql_queries::queries::media_files::create::insert_media_file_from_file_upl use tokens::tokens::media_files::MediaFileToken; use crate::http_server::endpoints::engine::drain_multipart_request::drain_multipart_request; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; #[derive(Debug, Serialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/engine/get_scene_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/engine/get_scene_handler.rs index 5544a824aa..9099203b1d 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/engine/get_scene_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/engine/get_scene_handler.rs @@ -22,7 +22,7 @@ use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/engine/process_upload_media_file.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/engine/process_upload_media_file.rs index 311fc44d29..cc9e2b8b70 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/engine/process_upload_media_file.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/engine/process_upload_media_file.rs @@ -19,7 +19,7 @@ use tokens::tokens::media_files::MediaFileToken; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; use crate::http_server::endpoints::media_files::upload::upload_generic::drain_multipart_request::{drain_multipart_request, MediaFileUploadSource}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; // TODO(bt,2023-12-20): THIS CODE NEEDS CLEANUP. This has been cargo culted three+ times. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/engine/update_scene_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/engine/update_scene_handler.rs index 2c00f4a000..446cd24c4d 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/engine/update_scene_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/engine/update_scene_handler.rs @@ -6,7 +6,7 @@ use actix_web::{HttpRequest, HttpResponse, web}; use tokens::tokens::media_files::MediaFileToken; use crate::http_server::endpoints::media_uploads::common::upload_error::UploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct UpdateSceneSuccessResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/events/list_events.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/events/list_events.rs index 9bc2845ef5..2df3208a41 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/events/list_events.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/events/list_events.rs @@ -12,7 +12,7 @@ use users_component::common_responses::user_avatars::default_avatar_color_from_u use users_component::common_responses::user_avatars::default_avatar_from_username::default_avatar_from_username; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct EventRecord { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/create_featured_item_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/create_featured_item_handler.rs index 3aa63d5775..90d48d1e23 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/create_featured_item_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/create_featured_item_handler.rs @@ -36,7 +36,7 @@ use tokens::tokens::w2l_templates::W2lTemplateToken; use tokens::tokens::zs_voices::ZsVoiceToken; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct CreateFeaturedItemRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/delete_featured_item_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/delete_featured_item_handler.rs index aaf6abab2e..8233271693 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/delete_featured_item_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/delete_featured_item_handler.rs @@ -29,7 +29,7 @@ use tokens::tokens::users::UserToken; use crate::http_server::endpoints::featured_items::create_featured_item_handler::CreateFeaturedItemError; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct DeleteFeaturedItemRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/get_is_featured_item_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/get_is_featured_item_handler.rs index d0b1c2e9f2..949e05c709 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/get_is_featured_item_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/featured_items/get_is_featured_item_handler.rs @@ -37,7 +37,7 @@ use tokens::tokens::zs_voices::ZsVoiceToken; use crate::http_server::endpoints::weights::get_weight_handler::GetWeightPathInfo; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct GetIsFeaturedItemPathInfo { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/flags/design_refresh_flag/build_design_refresh_cookie.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/flags/design_refresh_flag/build_design_refresh_cookie.rs index b0a50c7e96..f83c4f89d9 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/flags/design_refresh_flag/build_design_refresh_cookie.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/flags/design_refresh_flag/build_design_refresh_cookie.rs @@ -1,6 +1,6 @@ use actix_web::cookie::{Cookie, CookieBuilder}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; const REFRESH_COOKIE_NAME : &str = "refresh"; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/image_gen/enqueue_image_generation.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/image_gen/enqueue_image_generation.rs index b18cf23106..978c07198e 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/image_gen/enqueue_image_generation.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/image_gen/enqueue_image_generation.rs @@ -39,7 +39,7 @@ use tokens::tokens::users::UserToken; use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_session; use crate::http_server::endpoints::image_gen::prompt_enrichment::enrich_prompt; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_studio_access::allowed_studio_access; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/batch_get_inference_job_status_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/batch_get_inference_job_status_handler.rs index 9cdf75aa5f..405e0f61a8 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/batch_get_inference_job_status_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/batch_get_inference_job_status_handler.rs @@ -28,7 +28,7 @@ use crate::http_server::endpoints::inference_job::utils::estimate_job_progress:: use crate::http_server::endpoints::media_files::get::batch_get_media_files_handler::BatchGetMediaFilesQueryParams; use crate::http_server::web_utils::filter_model_name::maybe_filter_model_name; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For certain jobs or job classes (eg. non-premium), we kill the jobs if the user hasn't /// maintained a keepalive. This prevents wasted work when users who are unlikely to return diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/dismiss_finished_session_jobs_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/dismiss_finished_session_jobs_handler.rs index 0c79933c17..314df7ae19 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/dismiss_finished_session_jobs_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/dismiss_finished_session_jobs_handler.rs @@ -17,7 +17,7 @@ use tokens::tokens::generic_inference_jobs::InferenceJobToken; use crate::http_server::endpoints::inference_job::terminate_inference_job_handler::TerminateInferenceJobError; use crate::http_server::web_utils::require_user_session::require_user_session; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, ToSchema)] pub struct DismissFinishedSessionJobsSuccessResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/get_inference_job_status_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/get_inference_job_status_handler.rs index b96f4f819f..b3118fc480 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/get_inference_job_status_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/get_inference_job_status_handler.rs @@ -24,7 +24,7 @@ use tokens::tokens::generic_inference_jobs::InferenceJobToken; use crate::http_server::endpoints::inference_job::utils::estimate_job_progress::estimate_job_progress; use crate::http_server::web_utils::filter_model_name::maybe_filter_model_name; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For certain jobs or job classes (eg. non-premium), we kill the jobs if the user hasn't /// maintained a keepalive. This prevents wasted work when users who are unlikely to return diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/kill_inference_jobs_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/kill_inference_jobs_handler.rs index 76957e221c..b05df744a8 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/kill_inference_jobs_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/kill_inference_jobs_handler.rs @@ -13,7 +13,7 @@ use http_server_common::response::serialize_as_json_error::serialize_as_json_err use mysql_queries::queries::generic_inference::web::kill_generic_inference_jobs; use mysql_queries::queries::generic_inference::web::kill_generic_inference_jobs::{kill_generic_inference_jobs, KillGenericInferenceJobsArgs}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// Only certain job statuses should be modified. #[derive(Copy, Clone, PartialEq, Eq, Hash, Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/list_session_jobs_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/list_session_jobs_handler.rs index 8dff81c154..ee58c05f0f 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/list_session_jobs_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/list_session_jobs_handler.rs @@ -28,7 +28,7 @@ use tokens::tokens::users::UserToken; use crate::http_server::endpoints::inference_job::utils::estimate_job_progress::estimate_job_progress; use crate::http_server::web_utils::filter_model_name::maybe_filter_model_name; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For certain jobs or job classes (eg. non-premium), we kill the jobs if the user hasn't /// maintained a keepalive. This prevents wasted work when users who are unlikely to return diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/terminate_inference_job_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/terminate_inference_job_handler.rs index fd4e043c62..e6a7b077d4 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/terminate_inference_job_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/inference_job/terminate_inference_job_handler.rs @@ -14,7 +14,7 @@ use mysql_queries::queries::generic_inference::web::mark_generic_inference_job_c use tokens::tokens::generic_inference_jobs::InferenceJobToken; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/investor_demo/disable_demo_mode_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/investor_demo/disable_demo_mode_handler.rs index 020da80edd..63e5114dbc 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/investor_demo/disable_demo_mode_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/investor_demo/disable_demo_mode_handler.rs @@ -11,7 +11,7 @@ use http_server_common::request::get_request_host::get_request_host; use crate::http_server::endpoints::investor_demo::default_redirect::{DEFAULT_INVESTOR_REDIRECT, redirect_is_allowed}; use crate::http_server::endpoints::investor_demo::demo_cookie::STORYTELLER_DEMO_COOKIE_NAME; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct QueryFields { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/investor_demo/enable_demo_mode_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/investor_demo/enable_demo_mode_handler.rs index 675d486dd4..b9111feb4c 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/investor_demo/enable_demo_mode_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/investor_demo/enable_demo_mode_handler.rs @@ -10,7 +10,7 @@ use http_server_common::request::get_request_host::get_request_host; use crate::http_server::endpoints::investor_demo::default_redirect::{DEFAULT_INVESTOR_REDIRECT, redirect_is_allowed}; use crate::http_server::endpoints::investor_demo::demo_cookie::STORYTELLER_DEMO_COOKIE_NAME; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct QueryFields { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/leaderboard/get_leaderboard.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/leaderboard/get_leaderboard.rs index 40e8ac34bc..40eccc0fbd 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/leaderboard/get_leaderboard.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/leaderboard/get_leaderboard.rs @@ -21,7 +21,7 @@ use users_component::common_responses::user_avatars::default_avatar_from_usernam use users_component::common_responses::user_details_lite::{UserDefaultAvatarInfo, UserDetailsLight}; use crate::http_server::web_utils::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct LeaderboardResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/delete/delete_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/delete/delete_media_file_handler.rs index c7d441df88..e79705041b 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/delete/delete_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/delete/delete_media_file_handler.rs @@ -14,7 +14,7 @@ use mysql_queries::queries::media_files::get::get_media_file::get_media_file; use tokens::tokens::media_files::MediaFileToken; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::{delete_role_disambiguation, DeleteRole}; #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/change_media_file_visibility_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/change_media_file_visibility_handler.rs index fcf08dd1c4..1436fc0d7c 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/change_media_file_visibility_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/change_media_file_visibility_handler.rs @@ -16,7 +16,7 @@ use mysql_queries::queries::media_files::edit::update_media_file_visibility::{up use mysql_queries::queries::media_files::get::get_media_file::get_media_file; use tokens::tokens::media_files::MediaFileToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct ChangeMediaFileVisibilityRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/rename_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/rename_media_file_handler.rs index f9855a55b0..23bab89e37 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/rename_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/rename_media_file_handler.rs @@ -15,7 +15,7 @@ use mysql_queries::queries::media_files::rename_media_file::rename_media_file; use tokens::tokens::media_files::MediaFileToken; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::{delete_role_disambiguation, DeleteRole}; #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/set_media_file_cover_image_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/set_media_file_cover_image_handler.rs index 8e4ef34610..30b42ab28c 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/set_media_file_cover_image_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/set_media_file_cover_image_handler.rs @@ -17,7 +17,7 @@ use tokens::tokens::media_files::MediaFileToken; use crate::http_server::endpoints::weights::set_model_weight_cover_image_handler::SetModelWeightCoverImageError; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::{delete_role_disambiguation, DeleteRole}; #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/update_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/update_media_file_handler.rs index 70cbcf4ab5..8699e4fd8b 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/update_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/edit/update_media_file_handler.rs @@ -15,7 +15,7 @@ use mysql_queries::queries::media_files::edit::update_media_file_visibility::{up use mysql_queries::queries::media_files::get::get_media_file::get_media_file; use tokens::tokens::media_files::MediaFileToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct UpdateMediaFileRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/get/batch_get_media_files_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/get/batch_get_media_files_handler.rs index a28130abd5..c7e307ebe2 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/get/batch_get_media_files_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/get/batch_get_media_files_handler.rs @@ -33,7 +33,7 @@ use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::common_responses::media_file_cover_image_details::{MediaFileCoverImageDetails, MediaFileDefaultCover}; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/get/get_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/get/get_media_file_handler.rs index 0bbb9349b8..3769c8a5f9 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/get/get_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/get/get_media_file_handler.rs @@ -30,7 +30,7 @@ use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::common_responses::media_file_cover_image_details::{MediaFileCoverImageDetails, MediaFileDefaultCover}; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_featured_media_files_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_featured_media_files_handler.rs index 3449023dbd..580237603a 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_featured_media_files_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_featured_media_files_handler.rs @@ -31,7 +31,7 @@ use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats use crate::http_server::endpoints::media_files::helpers::get_scoped_engine_categories::get_scoped_engine_categories; use crate::http_server::endpoints::media_files::helpers::get_scoped_media_classes::get_scoped_media_classes; use crate::http_server::endpoints::media_files::helpers::get_scoped_media_types::get_scoped_media_types; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_explore_media_access::allowed_explore_media_access; #[derive(Deserialize, ToSchema, IntoParams)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_by_batch_token_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_by_batch_token_handler.rs index 68ab1fd380..4d7dd7c98c 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_by_batch_token_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_by_batch_token_handler.rs @@ -29,7 +29,7 @@ use crate::http_server::common_responses::media_file_origin_details::MediaFileOr use crate::http_server::common_responses::pagination_page::PaginationPage; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_studio_access::allowed_studio_access; #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_for_user_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_for_user_handler.rs index a86e47ed4e..44c4804957 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_for_user_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_for_user_handler.rs @@ -31,7 +31,7 @@ use crate::http_server::endpoints::media_files::helpers::get_scoped_engine_categ use crate::http_server::endpoints::media_files::helpers::get_scoped_media_classes::get_scoped_media_classes; use crate::http_server::endpoints::media_files::helpers::get_scoped_media_types::get_scoped_media_types; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_studio_access::allowed_studio_access; #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_handler.rs index 3554ad477c..445f08f496 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_media_files_handler.rs @@ -31,7 +31,7 @@ use crate::http_server::endpoints::media_files::helpers::get_scoped_engine_categ use crate::http_server::endpoints::media_files::helpers::get_scoped_media_classes::get_scoped_media_classes; use crate::http_server::endpoints::media_files::helpers::get_scoped_media_types::get_scoped_media_types; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_explore_media_access::allowed_explore_media_access; use crate::util::allowed_studio_access::allowed_studio_access; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_pinned_media_files_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_pinned_media_files_handler.rs index 6a0794290b..8c5a0cf8fe 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_pinned_media_files_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/list/list_pinned_media_files_handler.rs @@ -24,7 +24,7 @@ use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::common_responses::media_file_cover_image_details::{MediaFileCoverImageDetails, MediaFileDefaultCover}; use crate::http_server::common_responses::media_file_origin_details::MediaFileOriginDetails; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, ToSchema)] pub struct ListPinnedMediaFilesSuccessResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/search/search_featured_media_files_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/search/search_featured_media_files_handler.rs index ea0161853d..04a963eb31 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/search/search_featured_media_files_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/search/search_featured_media_files_handler.rs @@ -31,7 +31,7 @@ use crate::http_server::endpoints::media_files::helpers::get_scoped_engine_categ use crate::http_server::endpoints::media_files::helpers::get_scoped_media_classes::get_scoped_media_classes; use crate::http_server::endpoints::media_files::helpers::get_scoped_media_types::get_scoped_media_types; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_explore_media_access::allowed_explore_media_access; use crate::util::allowed_studio_access::allowed_studio_access; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/search/search_session_media_files_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/search/search_session_media_files_handler.rs index a05958feb5..f737dd5985 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/search/search_session_media_files_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/search/search_session_media_files_handler.rs @@ -32,7 +32,7 @@ use crate::http_server::endpoints::media_files::helpers::get_scoped_engine_categ use crate::http_server::endpoints::media_files::helpers::get_scoped_media_classes::get_scoped_media_classes; use crate::http_server::endpoints::media_files::helpers::get_scoped_media_types::get_scoped_media_types; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_explore_media_access::allowed_explore_media_access; use crate::util::allowed_studio_access::allowed_studio_access; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_audio_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_audio_media_file_handler.rs index 8b69d3bc42..6e12fa5452 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_audio_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_audio_media_file_handler.rs @@ -31,7 +31,7 @@ use tokens::tokens::media_files::MediaFileToken; use videos::get_mp4_info::{get_mp4_info, get_mp4_info_for_bytes, get_mp4_info_for_bytes_and_len}; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::check_creator_tokens::{check_creator_tokens, CheckCreatorTokenArgs, CheckCreatorTokenResult}; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_engine_asset/upload_engine_asset_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_engine_asset/upload_engine_asset_media_file_handler.rs index 2e4c67b6ca..61283f312e 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_engine_asset/upload_engine_asset_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_engine_asset/upload_engine_asset_media_file_handler.rs @@ -24,7 +24,7 @@ use videos::get_mp4_info::{get_mp4_info, get_mp4_info_for_bytes, get_mp4_info_fo use crate::http_server::endpoints::media_files::upload::upload_engine_asset::drain_multipart_request::drain_multipart_request; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; #[derive(Serialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_generic/process_upload_media_file.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_generic/process_upload_media_file.rs index 92619cf0fb..a303394852 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_generic/process_upload_media_file.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_generic/process_upload_media_file.rs @@ -20,7 +20,7 @@ use tokens::tokens::media_files::MediaFileToken; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; use crate::http_server::endpoints::media_files::upload::upload_generic::drain_multipart_request::{drain_multipart_request, MediaFileUploadSource}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; // TODO(bt,2023-12-20): THIS CODE NEEDS CLEANUP. This has been cargo culted three+ times. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_generic/upload_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_generic/upload_media_file_handler.rs index 3b28aebe14..ba6ef50eb1 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_generic/upload_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_generic/upload_media_file_handler.rs @@ -10,7 +10,7 @@ use tokens::tokens::media_files::MediaFileToken; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; use crate::http_server::endpoints::media_files::upload::upload_generic::process_upload_media_file::process_upload_media_file; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, ToSchema)] pub struct UploadMediaSuccessResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_image_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_image_media_file_handler.rs index 09b207528c..d3807566a9 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_image_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_image_media_file_handler.rs @@ -31,7 +31,7 @@ use mysql_queries::queries::media_files::get::get_media_file::get_media_file; use tokens::tokens::media_files::MediaFileToken; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::check_creator_tokens::{check_creator_tokens, CheckCreatorTokenArgs, CheckCreatorTokenResult}; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_engine_asset_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_engine_asset_media_file_handler.rs index 46d760de25..d83eb15344 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_engine_asset_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_engine_asset_media_file_handler.rs @@ -31,7 +31,7 @@ use videos::get_mp4_info::{get_mp4_info, get_mp4_info_for_bytes, get_mp4_info_fo use crate::http_server::endpoints::media_files::upload::upload_engine_asset::drain_multipart_request::drain_multipart_request; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; use crate::http_server::endpoints::media_files::upload::upload_new_scene_media_file_handler::UploadNewSceneMediaFileForm; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; /// Form-multipart request fields. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_scene_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_scene_media_file_handler.rs index d75275cd29..87b9ebd2de 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_scene_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_scene_media_file_handler.rs @@ -30,7 +30,7 @@ use tokens::tokens::media_files::MediaFileToken; use videos::get_mp4_info::{get_mp4_info, get_mp4_info_for_bytes, get_mp4_info_for_bytes_and_len}; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::check_creator_tokens::{check_creator_tokens, CheckCreatorTokenArgs, CheckCreatorTokenResult}; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_video_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_video_media_file_handler.rs index 59ea0941fd..550a6650ec 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_video_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_new_video_media_file_handler.rs @@ -32,7 +32,7 @@ use tokens::tokens::media_files::MediaFileToken; use videos::get_mp4_info::{get_mp4_info, get_mp4_info_for_bytes, get_mp4_info_for_bytes_and_len}; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::check_creator_tokens::{check_creator_tokens, CheckCreatorTokenArgs, CheckCreatorTokenResult}; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_pmx/upload_pmx_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_pmx/upload_pmx_media_file_handler.rs index d359f03148..f17f133acb 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_pmx/upload_pmx_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_pmx/upload_pmx_media_file_handler.rs @@ -33,7 +33,7 @@ use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileU use crate::http_server::endpoints::media_files::upload::upload_new_scene_media_file_handler::UploadNewSceneMediaFileForm; use crate::http_server::endpoints::media_files::upload::upload_pmx::extract_and_upload_pmx_files::{extract_and_upload_pmx_files, PmxError}; use crate::http_server::web_utils::require_moderator::{require_moderator, RequireModeratorError, UseDatabase}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; /// Form-multipart request fields. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_saved_scene_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_saved_scene_media_file_handler.rs index 25cfad8dad..8996f45723 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_saved_scene_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_saved_scene_media_file_handler.rs @@ -34,7 +34,7 @@ use videos::get_mp4_info::{get_mp4_info, get_mp4_info_for_bytes, get_mp4_info_fo use crate::http_server::endpoints::media_files::get::get_media_file_handler::GetMediaFilePathInfo; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; use crate::http_server::endpoints::media_files::upsert_upload::write_error::MediaFileWriteError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::check_creator_tokens::{check_creator_tokens, CheckCreatorTokenArgs, CheckCreatorTokenResult}; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_scene_snapshot_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_scene_snapshot_media_file_handler.rs index 4491913eeb..9aec26d785 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_scene_snapshot_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_scene_snapshot_media_file_handler.rs @@ -30,7 +30,7 @@ use tokens::tokens::media_files::MediaFileToken; use videos::get_mp4_info::{get_mp4_info, get_mp4_info_for_bytes, get_mp4_info_for_bytes_and_len}; use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::check_creator_tokens::{check_creator_tokens, CheckCreatorTokenArgs, CheckCreatorTokenResult}; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_video/upload_video_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_video/upload_video_media_file_handler.rs index 521f9584a5..08165df15d 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_video/upload_video_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upload/upload_video/upload_video_media_file_handler.rs @@ -24,7 +24,7 @@ use videos::get_mp4_info::{get_mp4_info, get_mp4_info_for_bytes, get_mp4_info_fo use crate::http_server::endpoints::media_files::upload::upload_error::MediaFileUploadError; use crate::http_server::endpoints::media_files::upload::upload_video::drain_multipart_request::drain_multipart_request; use crate::http_server::endpoints::media_files::upload::upload_video::drain_multipart_request::MediaFileUploadSource; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; #[derive(Serialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upsert_upload/write_engine_asset/write_engine_asset_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upsert_upload/write_engine_asset/write_engine_asset_media_file_handler.rs index e6c0e60f28..c2483a56db 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upsert_upload/write_engine_asset/write_engine_asset_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upsert_upload/write_engine_asset/write_engine_asset_media_file_handler.rs @@ -26,7 +26,7 @@ use videos::get_mp4_info::{get_mp4_info, get_mp4_info_for_bytes, get_mp4_info_fo use crate::http_server::endpoints::media_files::upsert_upload::write_engine_asset::drain_multipart_request::drain_multipart_request; use crate::http_server::endpoints::media_files::upsert_upload::write_error::MediaFileWriteError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::check_creator_tokens::{check_creator_tokens, CheckCreatorTokenArgs, CheckCreatorTokenResult}; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upsert_upload/write_scene_file/write_scene_file_media_file_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upsert_upload/write_scene_file/write_scene_file_media_file_handler.rs index 3ce208347b..a55d8f8f0d 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upsert_upload/write_scene_file/write_scene_file_media_file_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_files/upsert_upload/write_scene_file/write_scene_file_media_file_handler.rs @@ -28,7 +28,7 @@ use videos::get_mp4_info::{get_mp4_info, get_mp4_info_for_bytes, get_mp4_info_fo use crate::http_server::endpoints::media_files::upsert_upload::write_error::MediaFileWriteError; use crate::http_server::endpoints::media_files::upsert_upload::write_scene_file::drain_multipart_request::drain_multipart_request; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::check_creator_tokens::{check_creator_tokens, CheckCreatorTokenArgs, CheckCreatorTokenResult}; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/common/handle_upload.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/common/handle_upload.rs index ad2fec4680..9c6733440f 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/common/handle_upload.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/common/handle_upload.rs @@ -19,7 +19,7 @@ use tokens::tokens::media_uploads::MediaUploadToken; use crate::http_server::endpoints::media_uploads::common::drain_multipart_request::{drain_multipart_request, MediaSource}; use crate::http_server::endpoints::media_uploads::common::upload_error::UploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; pub enum SuccessCase { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/list_user_media_uploads_of_type.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/list_user_media_uploads_of_type.rs index 885f3349f8..fe39b3ee33 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/list_user_media_uploads_of_type.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/list_user_media_uploads_of_type.rs @@ -16,7 +16,7 @@ use tokens::tokens::users::UserToken; use users_component::session::lookup::user_session_extended::UserSessionExtended; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[deprecated(note = "Use `media_files` instead of `media_uploads`.")] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_audio.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_audio.rs index fc3872c8ee..4ff03b7161 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_audio.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_audio.rs @@ -9,7 +9,7 @@ use tokens::tokens::media_uploads::MediaUploadToken; use crate::http_server::endpoints::media_uploads::common::handle_upload::handle_upload; use crate::http_server::endpoints::media_uploads::common::upload_error::UploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[deprecated(note = "Use `media_files` instead of `media_uploads`.")] #[derive(Serialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_image.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_image.rs index 02bb5a6b42..6007b358f8 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_image.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_image.rs @@ -9,7 +9,7 @@ use tokens::tokens::media_uploads::MediaUploadToken; use crate::http_server::endpoints::media_uploads::common::handle_upload::handle_upload; use crate::http_server::endpoints::media_uploads::common::upload_error::UploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[deprecated(note = "Use `media_files` instead of `media_uploads`.")] #[derive(Serialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_media.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_media.rs index fdfd912fd3..273a07d167 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_media.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/media_uploads/upload_media.rs @@ -9,7 +9,7 @@ use tokens::tokens::media_uploads::MediaUploadToken; use crate::http_server::endpoints::media_uploads::common::handle_upload::handle_upload; use crate::http_server::endpoints::media_uploads::common::upload_error::UploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[deprecated(note = "Use `media_files` instead of `media_uploads`.")] #[derive(Serialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/misc/alpha_cookie.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/misc/alpha_cookie.rs index 2a6e1e4986..dff9a65a81 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/misc/alpha_cookie.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/misc/alpha_cookie.rs @@ -1,6 +1,6 @@ use actix_web::cookie::Cookie; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; pub const ALPHA_COOKIE_NAME : &str = "enable-alpha"; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/misc/detect_locale_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/misc/detect_locale_handler.rs index b49e1aed22..55415219a1 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/misc/detect_locale_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/misc/detect_locale_handler.rs @@ -10,7 +10,7 @@ use http_server_common::request::get_request_header_optional::get_request_header use http_server_common::request::parse_accept_language::parse_accept_language; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Success Response =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/misc/enable_alpha_easy_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/misc/enable_alpha_easy_handler.rs index a14620a7f8..98a11e2c49 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/misc/enable_alpha_easy_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/misc/enable_alpha_easy_handler.rs @@ -6,7 +6,7 @@ use actix_web::http::header::LOCATION; use log::info; use crate::http_server::endpoints::misc::alpha_cookie::alpha_cookie; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[get("/enable")] pub async fn enable_alpha_easy_handler( diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/misc/enable_alpha_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/misc/enable_alpha_handler.rs index 288aa2b2e5..7a6d634d90 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/misc/enable_alpha_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/misc/enable_alpha_handler.rs @@ -6,7 +6,7 @@ use actix_web::web::Query; use log::info; use crate::http_server::endpoints::misc::alpha_cookie::{alpha_cookie, ALPHA_COOKIE_NAME}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; const CONTENT_TYPE : &str = "text/html; charset=utf-8"; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/misc/root_index.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/misc/root_index.rs index 2c6c3c205c..042ec4461f 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/misc/root_index.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/misc/root_index.rs @@ -5,7 +5,7 @@ use actix_web::HttpResponse; use actix_web::web::Data; use log::debug; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; pub async fn get_root_index(server_state: Data>) -> HttpResponse { debug!("GET /"); // NB: Google load balancer hits this a lot, and it spams. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/mocap/enqueue_mocapnet.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/mocap/enqueue_mocapnet.rs index 47e478a03c..a11705f0e3 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/mocap/enqueue_mocapnet.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/mocap/enqueue_mocapnet.rs @@ -27,7 +27,7 @@ use users_component::session::lookup::user_session_extended::UserSessionExtended use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_session; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; /// Debug requests can get routed to special "debug-only" workers, which can diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/approval/pending_w2l_templates.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/approval/pending_w2l_templates.rs index 2efcb7f76e..c09d7ed778 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/approval/pending_w2l_templates.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/approval/pending_w2l_templates.rs @@ -10,7 +10,7 @@ use log::{log, warn}; use mysql_queries::queries::w2l::w2l_templates::list_pending_w2l_templates::list_pending_w2l_templates; use crate::http_server::web_utils::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct GetPendingW2lTemplatesResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/delete_category.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/delete_category.rs index 4f5dc91c58..f287d54f94 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/delete_category.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/delete_category.rs @@ -10,7 +10,7 @@ use log::{log, warn}; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::model_categories::toggle_model_category_soft_delete::{toggle_model_category_soft_delete, ToggleSoftDeleteState}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/edit_category.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/edit_category.rs index c20b80ad06..19a73edf7a 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/edit_category.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/edit_category.rs @@ -11,7 +11,7 @@ use http_server_common::response::serialize_as_json_error::serialize_as_json_err use mysql_queries::queries::model_categories::get_category_by_token::get_category_by_token; use mysql_queries::queries::model_categories::update_model_category::{update_model_category, UpdateModelCategoryArgs}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/list_tts_categories_for_moderation.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/list_tts_categories_for_moderation.rs index c1e5e5d7e1..98c0afb169 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/list_tts_categories_for_moderation.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/categories/list_tts_categories_for_moderation.rs @@ -10,7 +10,7 @@ use log::{log, warn}; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::model_categories::list_categories_query_builder::ListCategoriesQueryBuilder; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/info/moderator_token_info_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/info/moderator_token_info_handler.rs index a7de94f4a9..599e67f096 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/info/moderator_token_info_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/info/moderator_token_info_handler.rs @@ -28,7 +28,7 @@ use tokens::tokens::users::UserToken; use crate::http_server::web_utils::require_moderator::{require_moderator, RequireModeratorError, UseDatabase}; use crate::http_server::web_utils::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/add_ip_ban.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/add_ip_ban.rs index e075eb12ab..1f67129e01 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/add_ip_ban.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/add_ip_ban.rs @@ -11,7 +11,7 @@ use user_input_common::validate_user_provided_ip_address::validate_user_provided use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct AddIpBanRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/delete_ip_ban.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/delete_ip_ban.rs index 6a950d5af1..4b85f18332 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/delete_ip_ban.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/delete_ip_ban.rs @@ -11,7 +11,7 @@ use mysql_queries::queries::ip_bans::toggle_ip_ban::{IpBanToggleState, toggle_ip use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/get_ip_ban.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/get_ip_ban.rs index 0b3efb547e..332c422adf 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/get_ip_ban.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/get_ip_ban.rs @@ -11,7 +11,7 @@ use log::{error, log, warn}; use mysql_queries::queries::ip_bans::get_ip_ban::get_ip_ban; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/list_ip_bans.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/list_ip_bans.rs index 99df5373db..90b80a320d 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/list_ip_bans.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/ip_bans/list_ip_bans.rs @@ -9,7 +9,7 @@ use log::{error, log, warn}; use mysql_queries::queries::ip_bans::list_ip_bans::list_ip_bans; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct ListIpBansResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/get_tts_inference_queue_count.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/get_tts_inference_queue_count.rs index 29ed98d15d..0c95dbb106 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/get_tts_inference_queue_count.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/get_tts_inference_queue_count.rs @@ -9,7 +9,7 @@ use log::{log, warn}; use mysql_queries::queries::tts::tts_inference_jobs::get_pending_tts_inference_job_detailed_stats::{get_pending_tts_inference_job_detailed_stats, PendingCountResult}; use crate::http_server::web_utils::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct GetTtsInferenceQueueCountResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/get_w2l_inference_queue_count.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/get_w2l_inference_queue_count.rs index f521524651..9852d5e257 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/get_w2l_inference_queue_count.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/get_w2l_inference_queue_count.rs @@ -9,7 +9,7 @@ use log::{error, log, warn}; use mysql_queries::queries::w2l::w2l_inference_jobs::get_pending_w2l_inference_job_detailed_stats::{get_pending_w2l_inference_job_detailed_stats, PendingCountResult}; use crate::http_server::web_utils::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct GetW2lInferenceQueueCountResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/kill_tts_inference_jobs.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/kill_tts_inference_jobs.rs index 0cbe76569f..d6cb018194 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/kill_tts_inference_jobs.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/jobs/kill_tts_inference_jobs.rs @@ -9,7 +9,7 @@ use log::{error, log, warn}; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::tts::tts_inference_jobs::kill_tts_inference_jobs::{JobStatus, kill_tts_inference_jobs}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/stats/get_voice_count_stats.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/stats/get_voice_count_stats.rs index 266b74a8a8..64a0a5454b 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/stats/get_voice_count_stats.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/stats/get_voice_count_stats.rs @@ -8,7 +8,7 @@ use log::{log, warn}; use mysql_queries::queries::stats::get_voice_count_stats::get_voice_count_stats; use crate::http_server::web_utils::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct GetVoiceCountStatsResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_bans/ban_user.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_bans/ban_user.rs index 03c71b2d12..501a83061e 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_bans/ban_user.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_bans/ban_user.rs @@ -11,7 +11,7 @@ use mysql_queries::queries::users::user_profiles::get_user_profile_by_username:: use crate::http_server::web_utils::response_success_helpers::simple_json_success; use crate::http_server::web_utils::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct BanUserRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_bans/list_banned_users.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_bans/list_banned_users.rs index accc390281..77e6b9c4e7 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_bans/list_banned_users.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_bans/list_banned_users.rs @@ -7,7 +7,7 @@ use actix_web::http::StatusCode; use log::{log, warn}; use crate::http_server::web_utils::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // TODO: Implement the endpoint #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_feature_flags/edit_user_feature_flags_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_feature_flags/edit_user_feature_flags_handler.rs index 2f0bbd8091..e06db48191 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_feature_flags/edit_user_feature_flags_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_feature_flags/edit_user_feature_flags_handler.rs @@ -28,7 +28,7 @@ use users_component::session::lookup::user_session_feature_flags::UserSessionFea use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/list_roles.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/list_roles.rs index ea478dda58..f17c528eac 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/list_roles.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/list_roles.rs @@ -9,7 +9,7 @@ use log::{log, warn}; use mysql_queries::queries::users::user_roles::list_user_roles::{list_user_roles, UserRoleForList}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct ListUserRolesResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/list_staff.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/list_staff.rs index 5988cf9e32..6a2c6ceddb 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/list_staff.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/list_staff.rs @@ -9,7 +9,7 @@ use log::{error, log, warn}; use mysql_queries::queries::users::user_roles::list_staff::list_staff; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct ListStaffResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/set_user_role.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/set_user_role.rs index 56eee2bd0a..6501cb046e 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/set_user_role.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/user_roles/set_user_role.rs @@ -13,7 +13,7 @@ use mysql_queries::queries::users::user_roles::set_user_role::set_user_role; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/users/list_users.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/users/list_users.rs index 2cdda1ca21..a5e367161f 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/users/list_users.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/moderation/users/list_users.rs @@ -9,7 +9,7 @@ use log::{log, warn}; use mysql_queries::queries::users::user::list_users_query_builder::{ListUsersQueryBuilder, UserForList}; use crate::http_server::web_utils::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // TODO: Implement the endpoint #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/prompts/get_prompt_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/prompts/get_prompt_handler.rs index d705b556eb..2f29580417 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/prompts/get_prompt_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/prompts/get_prompt_handler.rs @@ -29,7 +29,7 @@ use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats use crate::http_server::endpoints::media_files::get::get_media_file_handler::GetMediaFileError; use crate::http_server::web_utils::require_user_session::require_user_session; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/service/health_check_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/service/health_check_handler.rs index fa95d09b5d..f26ff44934 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/service/health_check_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/service/health_check_handler.rs @@ -9,7 +9,7 @@ use log::{error, log}; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Success Response =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/service/public_info_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/service/public_info_handler.rs index 1e0f98e205..f2f98a805b 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/service/public_info_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/service/public_info_handler.rs @@ -5,7 +5,7 @@ use actix_web::http::StatusCode; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct PublicInfoResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/service/status_alert_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/service/status_alert_handler.rs index e803e7afba..f0d4e8169a 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/service/status_alert_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/service/status_alert_handler.rs @@ -7,7 +7,7 @@ use utoipa::ToSchema; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// How often the client should poll const REFRESH_INTERVAL: Duration = Duration::from_secs(60); diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_model_downloads.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_model_downloads.rs index 181159a460..b642f7cc33 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_model_downloads.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_model_downloads.rs @@ -8,7 +8,7 @@ use chrono::{DateTime, Utc}; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Success Response =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_news.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_news.rs index 7c23defdd7..0977f7bc63 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_news.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_news.rs @@ -8,7 +8,7 @@ use chrono::{DateTime, Utc}; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Success Response =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_plans.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_plans.rs index 9493364347..25b1a9cedd 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_plans.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/app_plans.rs @@ -9,7 +9,7 @@ use log::{log, warn}; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Success Response =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/post_app_analytics.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/post_app_analytics.rs index d5b26e3ab1..906d423914 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/post_app_analytics.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/stubs/post_app_analytics.rs @@ -9,7 +9,7 @@ use log::{log, warn}; use http_server_common::request::get_request_ip::get_request_ip; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/subscriptions/unsubscribe_reason.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/subscriptions/unsubscribe_reason.rs index aeee5638b3..bfea2aff0c 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/subscriptions/unsubscribe_reason.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/subscriptions/unsubscribe_reason.rs @@ -8,7 +8,7 @@ use http_server_common::request::get_request_ip::get_request_ip; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::users::user_subscriptions::insert_unsubscribe_reason::UnsubscribeReasonInsertBuilder; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/trending/list_trending_tts_models.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/trending/list_trending_tts_models.rs index f9e4dd6790..9c2759d883 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/trending/list_trending_tts_models.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/trending/list_trending_tts_models.rs @@ -21,7 +21,7 @@ use http_server_common::response::serialize_as_json_error::serialize_as_json_err use mysql_queries::queries::trending_model_analytics::list_trending_tts_models::list_trending_tts_models_with_pool; use tokens::tokens::tts_models::TtsModelToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // TODO TODO TODO: This endpoint is not done! // TODO TODO TODO: This endpoint is not done! diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/delete_tts_model.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/delete_tts_model.rs index bae0dc00b7..1e34974229 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/delete_tts_model.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/delete_tts_model.rs @@ -16,7 +16,7 @@ use mysql_queries::queries::tts::tts_models::get_tts_model::get_tts_model_by_tok use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::delete_role_disambiguation; use crate::util::delete_role_disambiguation::DeleteRole; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/delete_tts_result.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/delete_tts_result.rs index 502502fe31..b0b0d977f4 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/delete_tts_result.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/delete_tts_result.rs @@ -15,7 +15,7 @@ use mysql_queries::queries::tts::tts_results::query_tts_result::select_tts_resul use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::delete_role_disambiguation; use crate::util::delete_role_disambiguation::DeleteRole; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/edit_tts_model.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/edit_tts_model.rs index fe70e9cfa2..495d51aa43 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/edit_tts_model.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/edit_tts_model.rs @@ -28,7 +28,7 @@ use user_input_common::markdown_to_html::markdown_to_html; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; const DEFAULT_IETF_LANGUAGE_TAG : &str = "en-US"; const DEFAULT_IETF_PRIMARY_LANGUAGE_SUBTAG : &str = "en"; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/edit_tts_result.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/edit_tts_result.rs index 42029035b2..31dd3a5def 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/edit_tts_result.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/edit_tts_result.rs @@ -19,7 +19,7 @@ use mysql_queries::queries::tts::tts_results::query_tts_result::select_tts_resul use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/enqueue_infer_tts_handler/enqueue_infer_tts_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/enqueue_infer_tts_handler/enqueue_infer_tts_handler.rs index 3fd996858f..c59612bfb4 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/enqueue_infer_tts_handler/enqueue_infer_tts_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/enqueue_infer_tts_handler/enqueue_infer_tts_handler.rs @@ -37,7 +37,7 @@ use crate::configs::plans::plan::Plan; use crate::http_server::endpoints::investor_demo::demo_cookie::request_has_demo_cookie; use crate::http_server::endpoints::tts::enqueue_infer_tts_handler::get_tts_model_with_caching::get_tts_model_with_caching; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // TODO: Temporary for investor demo const STORYTELLER_DEMO_COOKIE_NAME : &str = "storyteller_demo"; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/enqueue_upload_tts_model.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/enqueue_upload_tts_model.rs index 43105c685e..89f46749f9 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/enqueue_upload_tts_model.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/enqueue_upload_tts_model.rs @@ -19,7 +19,7 @@ use mysql_queries::queries::generic_download::web::insert_generic_download_job:: use mysql_queries::queries::tts::tts_model_upload_jobs::insert_tts_model_upload_job::{insert_tts_model_upload_job, InsertTtsModelUploadJobArgs}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_model_title::validate_model_title; #[derive(Deserialize, Copy, Clone)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_inference_job_status.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_inference_job_status.rs index 73c6af44e9..0c4fc78203 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_inference_job_status.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_inference_job_status.rs @@ -17,7 +17,7 @@ use tokens::tokens::generic_inference_jobs::InferenceJobToken; use crate::http_server::web_utils::filter_model_name::filter_model_name; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_model.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_model.rs index a7e5983c5a..82ebccf0e3 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_model.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_model.rs @@ -24,7 +24,7 @@ use tts_common::text_pipelines::text_pipeline_type::TextPipelineType; use users_component::common_responses::user_avatars::default_avatar_color_from_username::default_avatar_color_from_username; use users_component::common_responses::user_avatars::default_avatar_from_username::default_avatar_from_username; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_model_use_count.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_model_use_count.rs index b7160d650b..06c6fa6b1d 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_model_use_count.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_model_use_count.rs @@ -11,7 +11,7 @@ use r2d2_redis::redis::Commands; use redis_common::redis_keys::RedisKeys; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_result.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_result.rs index b1c74c35e9..52876c3429 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_result.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_result.rs @@ -11,7 +11,7 @@ use mysql_queries::queries::tts::tts_results::query_tts_result::select_tts_resul use mysql_queries::queries::tts::tts_results::query_tts_result::TtsResultRecordForResponse; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_upload_model_job_status.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_upload_model_job_status.rs index ca5cd4df22..6b29db5075 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_upload_model_job_status.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/get_tts_upload_model_job_status.rs @@ -13,7 +13,7 @@ use mysql_queries::queries::tts::tts_model_upload_jobs::get_tts_model_upload_job use redis_common::redis_keys::RedisKeys; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_tts_models.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_tts_models.rs index 374f5a41af..91cfe8697d 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_tts_models.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_tts_models.rs @@ -24,7 +24,7 @@ use mysql_queries::queries::tts::tts_category_assignments::fetch_and_build_tts_m use mysql_queries::queries::users::user_sessions::get_user_session_by_token::SessionUserRecord; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone)] pub struct TtsModelRecordForResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_user_tts_inference_results.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_user_tts_inference_results.rs index fd2ae37080..302eda946c 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_user_tts_inference_results.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_user_tts_inference_results.rs @@ -12,7 +12,7 @@ use http_server_common::error::simple_json_error_response::simple_json_error_res use mysql_queries::queries::tts::tts_results::list_tts_results_query_builder::{ListTtsResultsQueryBuilder, TtsInferenceRecordForList}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_user_tts_models.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_user_tts_models.rs index 65e4f48bc7..2f53312313 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_user_tts_models.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/list_user_tts_models.rs @@ -11,7 +11,7 @@ use log::{info, log, warn}; use mysql_queries::queries::tts::tts_models::list_tts_models::{list_tts_models, TtsModelRecordForList}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/search_tts_models_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/search_tts_models_handler.rs index 7b5a5aecf1..c3fc56f3f3 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/tts/search_tts_models_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/tts/search_tts_models_handler.rs @@ -19,7 +19,7 @@ use tokens::tokens::tts_models::TtsModelToken; use tokens::tokens::users::UserToken; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct SearchTtsModelsRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/batch_get_user_bookmarks_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/batch_get_user_bookmarks_handler.rs index 69ac8b47c6..9c02f7ca47 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/batch_get_user_bookmarks_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/batch_get_user_bookmarks_handler.rs @@ -15,7 +15,7 @@ use tokens::tokens::model_weights::ModelWeightToken; use tokens::tokens::tts_models::TtsModelToken; use tokens::tokens::user_bookmarks::UserBookmarkToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; const MAX_BATCH_SIZE : usize = 200; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/create_user_bookmark_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/create_user_bookmark_handler.rs index e4553be705..66f7aeb40c 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/create_user_bookmark_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/create_user_bookmark_handler.rs @@ -32,7 +32,7 @@ use tokens::tokens::w2l_templates::W2lTemplateToken; use tokens::tokens::zs_voices::ZsVoiceToken; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct CreateUserBookmarkRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/delete_user_bookmark_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/delete_user_bookmark_handler.rs index a41634e146..f8e48ce0c2 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/delete_user_bookmark_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/delete_user_bookmark_handler.rs @@ -22,7 +22,7 @@ use tokens::tokens::user_bookmarks::UserBookmarkToken; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_entity_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_entity_handler.rs index 061188be5e..82f7ca5416 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_entity_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_entity_handler.rs @@ -21,7 +21,7 @@ use tokens::tokens::user_bookmarks::UserBookmarkToken; use users_component::common_responses::user_details_lite::{UserDefaultAvatarInfo, UserDetailsLight}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize, ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_session_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_session_handler.rs index 953205e0d0..dd84366d2e 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_session_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_session_handler.rs @@ -13,7 +13,7 @@ use mysql_queries::queries::users::user_bookmarks::list_user_bookmarks::list_use use tokens::tokens::user_bookmarks::UserBookmarkToken; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct ListUserBookmarksQueryData { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_user_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_user_handler.rs index 452451357c..5dad946e2a 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_user_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/user_bookmarks/list_user_bookmarks_for_user_handler.rs @@ -26,7 +26,7 @@ use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::common_responses::pagination_page::PaginationPage; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct ListUserBookmarksPathInfo { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/batch_get_user_rating_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/batch_get_user_rating_handler.rs index 721eeb1673..fe33d7c8fa 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/batch_get_user_rating_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/batch_get_user_rating_handler.rs @@ -15,7 +15,7 @@ use tokens::tokens::media_files::MediaFileToken; use tokens::tokens::model_weights::ModelWeightToken; use tokens::tokens::tts_models::TtsModelToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; const MAX_BATCH_SIZE : usize = 200; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/get_user_rating_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/get_user_rating_handler.rs index b56e2dff5b..8a3f5f1359 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/get_user_rating_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/get_user_rating_handler.rs @@ -15,7 +15,7 @@ use tokens::tokens::model_weights::ModelWeightToken; use tokens::tokens::tts_models::TtsModelToken; use tokens::tokens::w2l_templates::W2lTemplateToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/set_user_rating_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/set_user_rating_handler.rs index 35907e5956..0be428555a 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/set_user_rating_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/user_ratings/set_user_rating_handler.rs @@ -24,7 +24,7 @@ use tokens::tokens::tts_results::TtsResultToken; use tokens::tokens::w2l_results::W2lResultToken; use tokens::tokens::w2l_templates::W2lTemplateToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/vocoders/get_vocoder.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/vocoders/get_vocoder.rs index 19ce1b8dac..7d8a0dbd2a 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/vocoders/get_vocoder.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/vocoders/get_vocoder.rs @@ -18,7 +18,7 @@ use enums::common::vocoder_type::VocoderType; use mysql_queries::queries::vocoder::get_vocoder_model::get_vocoder_model_by_token; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/vocoders/list_vocoders.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/vocoders/list_vocoders.rs index a493b273ad..4740cb911c 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/vocoders/list_vocoders.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/vocoders/list_vocoders.rs @@ -16,7 +16,7 @@ use enums::common::vocoder_type::VocoderType; use mysql_queries::queries::vocoder::list_vocoder_models::{list_vocoder_models, VocoderModelListItem}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct ListVocodersSuccessResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_clone_requests/check_if_voice_clone_request_submitted.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_clone_requests/check_if_voice_clone_request_submitted.rs index caaf2c41f0..d8216b3e69 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_clone_requests/check_if_voice_clone_request_submitted.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_clone_requests/check_if_voice_clone_request_submitted.rs @@ -9,7 +9,7 @@ use log::{log, warn}; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::voice_clone_requests::get_voice_clone_request::{get_voice_clone_request_by_token, get_voice_clone_request_by_user_token}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_clone_requests/create_voice_clone_request.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_clone_requests/create_voice_clone_request.rs index 35ca6831e3..044a830ee3 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_clone_requests/create_voice_clone_request.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_clone_requests/create_voice_clone_request.rs @@ -10,7 +10,7 @@ use http_server_common::request::get_request_ip::get_request_ip; use http_server_common::response::serialize_as_json_error::serialize_as_json_error; use mysql_queries::queries::voice_clone_requests::insert_voice_clone_requests_builder::InsertVoiceCloneRequestBuilder; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // =============== Request =============== diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_conversion/inference/enqueue_voice_conversion_inference.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_conversion/inference/enqueue_voice_conversion_inference.rs index 211bb0f9be..20f3a014e1 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_conversion/inference/enqueue_voice_conversion_inference.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_conversion/inference/enqueue_voice_conversion_inference.rs @@ -36,7 +36,7 @@ use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_se use crate::http_server::endpoints::investor_demo::demo_cookie::request_has_demo_cookie; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::memory_cache::model_token_to_info_cache::{ModelInfoForInferenceJob, ModelTokenToInfoCache}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// Debug requests can get routed to special "debug-only" workers, which can /// be used to trial new code, run debugging, etc. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_conversion/models/list_voice_conversion_models.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_conversion/models/list_voice_conversion_models.rs index 2e98cd6b66..547294e0f7 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_conversion/models/list_voice_conversion_models.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_conversion/models/list_voice_conversion_models.rs @@ -23,7 +23,7 @@ use mysql_queries::queries::users::user_sessions::get_user_session_by_token::Ses use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone)] pub struct VoiceConversionModel { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/inference/enqueue_tts_request.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/inference/enqueue_tts_request.rs index d675f02db6..7997f43b1d 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/inference/enqueue_tts_request.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/inference/enqueue_tts_request.rs @@ -34,7 +34,7 @@ use tokens::tokens::users::UserToken; use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_session; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// Debug requests can get routed to special "debug-only" workers, which can /// be used to trial new code, run debugging, etc. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/delete_sample.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/delete_sample.rs index ae24348303..8e0b576953 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/delete_sample.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/delete_sample.rs @@ -11,7 +11,7 @@ use mysql_queries::queries::voice_designer::voice_samples::delete_sample::{delet use mysql_queries::queries::voice_designer::voice_samples::get_dataset_sample::get_dataset_sample_by_token; use tokens::tokens::zs_voice_dataset_samples::ZsVoiceDatasetSampleToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::{delete_role_disambiguation, DeleteRole}; // TODO(bt,2023-10-10): This is way too much boilerplate. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/list_samples_by_dataset.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/list_samples_by_dataset.rs index da5d4500eb..6d78289133 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/list_samples_by_dataset.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/list_samples_by_dataset.rs @@ -13,7 +13,7 @@ use tokens::tokens::users::UserToken; use tokens::tokens::zs_voice_dataset_samples::ZsVoiceDatasetSampleToken; use tokens::tokens::zs_voice_datasets::ZsVoiceDatasetToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone)] pub struct ZsSampleRecordForResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/upload_zs_sample.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/upload_zs_sample.rs index 824ea2b185..f1e08db06d 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/upload_zs_sample.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_dataset_samples/upload_zs_sample.rs @@ -26,7 +26,7 @@ use tokens::tokens::zs_voice_datasets::ZsVoiceDatasetToken; use crate::http_server::endpoints::media_uploads::common::drain_multipart_request::{drain_multipart_request, MediaSource}; use crate::http_server::endpoints::media_uploads::common::upload_error::UploadError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; #[derive(Serialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/create_dataset.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/create_dataset.rs index e16dc0e1ef..1993816ed4 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/create_dataset.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/create_dataset.rs @@ -13,7 +13,7 @@ use http_server_common::response::serialize_as_json_error::serialize_as_json_err use mysql_queries::queries::voice_designer::datasets::create_dataset::{create_dataset, CreateDatasetArgs}; use tokens::tokens::zs_voice_datasets::ZsVoiceDatasetToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct CreateDatasetRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/delete_dataset.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/delete_dataset.rs index d539e87ec1..b29a085379 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/delete_dataset.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/delete_dataset.rs @@ -15,7 +15,7 @@ use mysql_queries::queries::voice_designer::datasets::get_dataset::get_dataset_b use tokens::tokens::zs_voice_datasets::ZsVoiceDatasetToken; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::{delete_role_disambiguation, DeleteRole}; #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/get_dataset.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/get_dataset.rs index ca66cb1d1c..a9bcbbd326 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/get_dataset.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/get_dataset.rs @@ -15,7 +15,7 @@ use tokens::tokens::users::UserToken; use tokens::tokens::zs_voice_datasets::ZsVoiceDatasetToken; use users_component::common_responses::user_details_lite::UserDetailsLight; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone)] pub struct GetDatasetResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/list_datasets_by_session.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/list_datasets_by_session.rs index b6edce1f8c..1a4cab59d1 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/list_datasets_by_session.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/list_datasets_by_session.rs @@ -12,7 +12,7 @@ use mysql_queries::queries::voice_designer::datasets::list_datasets_by_username: use tokens::tokens::zs_voice_datasets::ZsVoiceDatasetToken; use users_component::common_responses::user_details_lite::UserDetailsLight; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone)] pub struct ZsDatasetRecord { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/list_datasets_by_user.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/list_datasets_by_user.rs index d18649e1f1..8f000741fe 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/list_datasets_by_user.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/list_datasets_by_user.rs @@ -14,7 +14,7 @@ use mysql_queries::queries::voice_designer::datasets::list_datasets_by_username: use tokens::tokens::zs_voice_datasets::ZsVoiceDatasetToken; use users_component::common_responses::user_details_lite::UserDetailsLight; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone, ToSchema)] pub struct ZsDatasetRecord { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/update_dataset.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/update_dataset.rs index 2fb7203881..dc9b2fd2ed 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/update_dataset.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voice_datasets/update_dataset.rs @@ -16,7 +16,7 @@ use mysql_queries::queries::voice_designer::datasets::get_dataset::get_dataset_b use mysql_queries::queries::voice_designer::datasets::update_dataset::{update_dataset, UpdateDatasetArgs}; use tokens::tokens::zs_voice_datasets::ZsVoiceDatasetToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct UpdateDatasetRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/create_voice.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/create_voice.rs index 8ca05a54f3..ea0f16b85b 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/create_voice.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/create_voice.rs @@ -33,7 +33,7 @@ use tokens::tokens::users::UserToken; use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_session; use crate::http_server::endpoints::media_uploads::common::upload_error::UploadError; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct EnqueueCreateVoiceRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/delete_voice.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/delete_voice.rs index a590e7739f..c6ef3102b5 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/delete_voice.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/delete_voice.rs @@ -15,7 +15,7 @@ use mysql_queries::queries::voice_designer::voices::get_voice::get_voice_by_toke use tokens::tokens::zs_voices::ZsVoiceToken; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::{delete_role_disambiguation, DeleteRole}; #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/get_voice.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/get_voice.rs index 7fc293ec31..9afae07761 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/get_voice.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/get_voice.rs @@ -14,7 +14,7 @@ use tokens::tokens::users::UserToken; use tokens::tokens::zs_voices::ZsVoiceToken; use users_component::common_responses::user_details_lite::UserDetailsLight; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone)] pub struct GetVoiceResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_available_voices.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_available_voices.rs index ff704e2be8..64d9a4e265 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_available_voices.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_available_voices.rs @@ -11,7 +11,7 @@ use mysql_queries::queries::voice_designer::voices::list_voices_query_builder::L use tokens::tokens::zs_voices::ZsVoiceToken; use users_component::common_responses::user_details_lite::UserDetailsLight; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct ListZsVoicesQuery { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_voices_by_session.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_voices_by_session.rs index 5c92f5c73c..6bf5bc8215 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_voices_by_session.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_voices_by_session.rs @@ -11,7 +11,7 @@ use mysql_queries::queries::voice_designer::voices::list_voices_by_username::lis use tokens::tokens::zs_voices::ZsVoiceToken; use users_component::common_responses::user_details_lite::UserDetailsLight; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone)] pub struct Voice { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_voices_by_user.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_voices_by_user.rs index 64e1473a55..fea4264f84 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_voices_by_user.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/list_voices_by_user.rs @@ -13,7 +13,7 @@ use mysql_queries::queries::voice_designer::voices::list_voices_by_username::lis use tokens::tokens::zs_voices::ZsVoiceToken; use users_component::common_responses::user_details_lite::UserDetailsLight; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone)] pub struct Voice { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/update_voice.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/update_voice.rs index 700963e9ad..096dc2c323 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/update_voice.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/voice_designer/voices/update_voice.rs @@ -14,7 +14,7 @@ use mysql_queries::queries::voice_designer::voices::get_voice::get_voice_by_toke use mysql_queries::queries::voice_designer::voices::update_voice::{update_voice, UpdateVoiceArgs}; use tokens::tokens::zs_voices::ZsVoiceToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct UpdateVoiceRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/delete_w2l_result.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/delete_w2l_result.rs index e5fe0a7e84..e21155fe4a 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/delete_w2l_result.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/delete_w2l_result.rs @@ -15,7 +15,7 @@ use mysql_queries::queries::w2l::w2l_results::query_w2l_result::select_w2l_resul use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::delete_role_disambiguation; use crate::util::delete_role_disambiguation::DeleteRole; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/delete_w2l_template.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/delete_w2l_template.rs index e50b628d0f..e0ad135867 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/delete_w2l_template.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/delete_w2l_template.rs @@ -16,7 +16,7 @@ use mysql_queries::queries::w2l::w2l_templates::get_w2l_template::select_w2l_tem use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::delete_role_disambiguation; use crate::util::delete_role_disambiguation::DeleteRole; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/edit_w2l_result.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/edit_w2l_result.rs index a69409fac9..4586246adf 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/edit_w2l_result.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/edit_w2l_result.rs @@ -19,7 +19,7 @@ use mysql_queries::queries::w2l::w2l_results::query_w2l_result::select_w2l_resul use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/edit_w2l_template.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/edit_w2l_template.rs index 47841be19d..6acd3f1650 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/edit_w2l_template.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/edit_w2l_template.rs @@ -21,7 +21,7 @@ use user_input_common::markdown_to_html::markdown_to_html; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_infer_w2l.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_infer_w2l.rs index 565732badb..cd9ea40958 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_infer_w2l.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_infer_w2l.rs @@ -18,7 +18,7 @@ use mysql_queries::queries::w2l::w2l_inference_jobs::insert_w2l_inference_job::{ use redis_common::redis_keys::RedisKeys; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize)] pub struct InferW2lRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_infer_w2l_with_uploads.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_infer_w2l_with_uploads.rs index aa1b11f1cf..af382ea937 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_infer_w2l_with_uploads.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_infer_w2l_with_uploads.rs @@ -24,7 +24,7 @@ use redis_common::redis_keys::RedisKeys; use crate::http_server::web_utils::read_multipart_field_bytes::checked_read_multipart_bytes; use crate::http_server::web_utils::read_multipart_field_bytes::read_multipart_field_as_text; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; const BUCKET_AUDIO_FILE_NAME : &str = "input_audio_file"; const BUCKET_IMAGE_FILE_NAME: &str = "input_image_file"; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_upload_w2l_template.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_upload_w2l_template.rs index 0d40469536..94e9b34610 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_upload_w2l_template.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/enqueue_upload_w2l_template.rs @@ -18,7 +18,7 @@ use mysql_queries::queries::w2l::w2l_template_upload_jobs::insert_w2l_template_u use user_input_common::check_for_slurs::contains_slurs; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::http_server::validations::validate_model_title::validate_model_title; #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_inference_job_status.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_inference_job_status.rs index 315d9eb896..52440345f2 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_inference_job_status.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_inference_job_status.rs @@ -13,7 +13,7 @@ use mysql_queries::queries::w2l::w2l_inference_jobs::get_w2l_inference_job_statu use redis_common::redis_keys::RedisKeys; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_result.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_result.rs index 5dc8beba53..b294ff67ed 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_result.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_result.rs @@ -11,7 +11,7 @@ use mysql_queries::queries::w2l::w2l_results::query_w2l_result::select_w2l_resul use mysql_queries::queries::w2l::w2l_results::query_w2l_result::W2lResultRecordForResponse; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_template.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_template.rs index c5baf58309..184d6ff816 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_template.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_template.rs @@ -11,7 +11,7 @@ use mysql_queries::queries::w2l::w2l_templates::get_w2l_template::select_w2l_tem use mysql_queries::queries::w2l::w2l_templates::get_w2l_template::W2lTemplateRecordForResponse; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_template_use_count.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_template_use_count.rs index 8194fdd99a..775e999cd1 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_template_use_count.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_template_use_count.rs @@ -11,7 +11,7 @@ use r2d2_redis::redis::Commands; use redis_common::redis_keys::RedisKeys; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_upload_template_job_status.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_upload_template_job_status.rs index bcb9fe3911..d28443a1ed 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_upload_template_job_status.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/get_w2l_upload_template_job_status.rs @@ -13,7 +13,7 @@ use mysql_queries::queries::w2l::w2l_template_upload_jobs::get_w2l_template_uplo use redis_common::redis_keys::RedisKeys; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_user_w2l_inference_results.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_user_w2l_inference_results.rs index 78f58c9997..059e769eaa 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_user_w2l_inference_results.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_user_w2l_inference_results.rs @@ -12,7 +12,7 @@ use mysql_queries::queries::w2l::w2l_results::list_w2l_inference_results_query_b use mysql_queries::queries::w2l::w2l_results::list_w2l_inference_results_query_builder::W2lInferenceRecordForList; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_user_w2l_templates.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_user_w2l_templates.rs index 8696b8e608..3b7b2a77c4 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_user_w2l_templates.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_user_w2l_templates.rs @@ -11,7 +11,7 @@ use log::{info, log, warn}; use mysql_queries::queries::w2l::w2l_templates::list_w2l_templates::{list_w2l_templates, W2lTemplateRecordForList}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_w2l_templates.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_w2l_templates.rs index 67675a8a44..288a6e1d65 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_w2l_templates.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/list_w2l_templates.rs @@ -9,7 +9,7 @@ use log::{error, log, warn}; use mysql_queries::queries::w2l::w2l_templates::list_w2l_templates::{list_w2l_templates, W2lTemplateRecordForList}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize)] pub struct ListW2lTemplatesSuccessResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/set_w2l_template_mod_approval.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/set_w2l_template_mod_approval.rs index 2bed0bb73d..1e7b79a5de 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/set_w2l_template_mod_approval.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/w2l/set_w2l_template_mod_approval.rs @@ -12,7 +12,7 @@ use mysql_queries::queries::w2l::w2l_templates::get_w2l_template::select_w2l_tem use mysql_queries::queries::w2l::w2l_templates::set_w2l_template_mod_approval::set_w2l_template_mod_approval; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; /// For the URL PathInfo #[derive(Deserialize)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/delete_weight_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/delete_weight_handler.rs index 18b25a2f99..8c435a1bf7 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/delete_weight_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/delete_weight_handler.rs @@ -18,7 +18,7 @@ use mysql_queries::queries::model_weights::get::get_weight::get_weight_by_token; use tokens::tokens::model_weights::ModelWeightToken; use crate::http_server::web_utils::response_success_helpers::simple_json_success; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::delete_role_disambiguation::{delete_role_disambiguation, DeleteRole}; #[derive(Deserialize,ToSchema)] diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/get_weight_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/get_weight_handler.rs index 5a54e91102..dbd0800cf3 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/get_weight_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/get_weight_handler.rs @@ -19,7 +19,7 @@ use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; use crate::http_server::common_responses::weights_cover_image_details::WeightsCoverImageDetails; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone, ToSchema)] pub struct GetWeightResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_available_weights_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_available_weights_handler.rs index 888878a0e0..9538ce0117 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_available_weights_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_available_weights_handler.rs @@ -21,7 +21,7 @@ use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::common_responses::pagination_cursors::PaginationCursors; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; use crate::http_server::common_responses::weights_cover_image_details::WeightsCoverImageDetails; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize,ToSchema)] pub struct ListAvailableWeightsQuery { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_featured_weights_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_featured_weights_handler.rs index 2fd3fc156b..2c36769070 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_featured_weights_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_featured_weights_handler.rs @@ -25,7 +25,7 @@ use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats use crate::http_server::common_responses::weights_cover_image_details::WeightsCoverImageDetails; use crate::http_server::endpoints::media_files::list::list_featured_media_files_handler::ListFeaturedMediaFilesError; use crate::http_server::endpoints::media_files::list::list_media_files_handler::{ListMediaFilesError, ListMediaFilesQueryParams}; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema, IntoParams)] pub struct ListFeaturedWeightsQueryParams { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_pinned_weights_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_pinned_weights_handler.rs index c72e4ada91..be72b7c9b1 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_pinned_weights_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_pinned_weights_handler.rs @@ -19,7 +19,7 @@ use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; use crate::http_server::common_responses::weights_cover_image_details::WeightsCoverImageDetails; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, ToSchema)] pub struct ListPinnedWeightsSuccessResponse { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_weights_by_user_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_weights_by_user_handler.rs index 31baa89130..c262a70ea7 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_weights_by_user_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/list_weights_by_user_handler.rs @@ -21,7 +21,7 @@ use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::common_responses::pagination_page::PaginationPage; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; use crate::http_server::common_responses::weights_cover_image_details::WeightsCoverImageDetails; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Serialize, Clone, ToSchema)] pub struct Weight { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/search_model_weights_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/search_model_weights_handler.rs index 58d7075178..f222f53842 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/search_model_weights_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/search_model_weights_handler.rs @@ -25,7 +25,7 @@ use users_component::common_responses::user_details_lite::UserDetailsLight; use crate::http_server::common_responses::simple_entity_stats::SimpleEntityStats; use crate::http_server::common_responses::weights_cover_image_details::WeightsCoverImageDetails; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct SearchModelWeightsRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/set_model_weight_cover_image_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/set_model_weight_cover_image_handler.rs index 01cb64df73..b67c9125f3 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/set_model_weight_cover_image_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/set_model_weight_cover_image_handler.rs @@ -19,7 +19,7 @@ use mysql_queries::queries::model_weights::get::get_weight::get_weight_by_token; use tokens::tokens::media_files::MediaFileToken; use tokens::tokens::model_weights::ModelWeightToken; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Deserialize, ToSchema)] pub struct SetModelWeightCoverImageRequest { diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/update_weight_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/update_weight_handler.rs index 8c479a4c29..2a615f37cb 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/weights/update_weight_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/weights/update_weight_handler.rs @@ -20,7 +20,7 @@ use tokens::tokens::model_weights::ModelWeightToken; use user_input_common::check_for_slurs::contains_slurs; use user_input_common::markdown_to_html::markdown_to_html; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; // TODO will eventually be polymorphic /// **IMPORTANT**: This endpoint handles sparse (by-field) updates rather than wholesale updates. diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_comfy_ui_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_comfy_ui_handler.rs index 3360b766b3..9f062657fc 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_comfy_ui_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_comfy_ui_handler.rs @@ -33,7 +33,7 @@ use users_component::session::lookup::user_session_extended::UserSessionExtended use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_session; use crate::configs::plans::plan_category::PlanCategory; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_video_style_transfer_access::allowed_video_style_transfer_access; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_video_style_transfer_handler.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_video_style_transfer_handler.rs index 4a904c3ecf..d596a153cf 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_video_style_transfer_handler.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_video_style_transfer_handler.rs @@ -34,7 +34,7 @@ use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_se use crate::configs::plans::plan_category::PlanCategory; use crate::http_server::endpoints::workflows::coordinate_workflow_args::{coordinate_workflow_args, CoordinatedWorkflowArgs}; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_video_style_transfer_access::allowed_video_style_transfer_access; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_workflow_upload_request.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_workflow_upload_request.rs index 7d1fdc3496..97ed1dd153 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_workflow_upload_request.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/workflows/enqueue_workflow_upload_request.rs @@ -41,7 +41,7 @@ use tokens::tokens::users::UserToken; use crate::configs::plans::get_correct_plan_for_session::get_correct_plan_for_session; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; use crate::util::allowed_studio_access::allowed_studio_access; use crate::http_server::validations::validate_idempotency_token_format::validate_idempotency_token_format; diff --git a/crates/service/web/storyteller_web/src/http_server/middleware/pushback_filter_middleware.rs b/crates/service/web/storyteller_web/src/http_server/middleware/pushback_filter_middleware.rs index baecbbec6d..853517a64c 100644 --- a/crates/service/web/storyteller_web/src/http_server/middleware/pushback_filter_middleware.rs +++ b/crates/service/web/storyteller_web/src/http_server/middleware/pushback_filter_middleware.rs @@ -14,7 +14,7 @@ use log::warn; use http_server_common::request::get_request_ip::get_service_request_ip; use crate::http_server::web_utils::response_error_helpers::to_simple_json_error; -use crate::server_state::StaticFeatureFlags; +use crate::state::server_state::StaticFeatureFlags; // There are two steps in middleware processing. // 1. Middleware initialization, middleware factory gets called with diff --git a/crates/service/web/storyteller_web/src/http_server/web_utils/require_moderator.rs b/crates/service/web/storyteller_web/src/http_server/web_utils/require_moderator.rs index d8dc232b37..999f1adbc7 100644 --- a/crates/service/web/storyteller_web/src/http_server/web_utils/require_moderator.rs +++ b/crates/service/web/storyteller_web/src/http_server/web_utils/require_moderator.rs @@ -10,7 +10,7 @@ use sqlx::pool::PoolConnection; use mysql_queries::queries::users::user_sessions::get_user_session_by_token::SessionUserRecord; use crate::http_server::endpoints::beta_keys::create_beta_keys_handler::CreateBetaKeysError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Debug)] pub enum RequireModeratorError { diff --git a/crates/service/web/storyteller_web/src/http_server/web_utils/require_user_session.rs b/crates/service/web/storyteller_web/src/http_server/web_utils/require_user_session.rs index 64dbd1cc29..b700d30cf9 100644 --- a/crates/service/web/storyteller_web/src/http_server/web_utils/require_user_session.rs +++ b/crates/service/web/storyteller_web/src/http_server/web_utils/require_user_session.rs @@ -7,7 +7,7 @@ use log::warn; use mysql_queries::queries::users::user_sessions::get_user_session_by_token::SessionUserRecord; use crate::http_server::endpoints::beta_keys::create_beta_keys_handler::CreateBetaKeysError; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; #[derive(Debug)] pub enum RequireUserSessionError { diff --git a/crates/service/web/storyteller_web/src/http_server/web_utils/try_delete_session_cache.rs b/crates/service/web/storyteller_web/src/http_server/web_utils/try_delete_session_cache.rs index 3d2bc48eab..2af273f4a6 100644 --- a/crates/service/web/storyteller_web/src/http_server/web_utils/try_delete_session_cache.rs +++ b/crates/service/web/storyteller_web/src/http_server/web_utils/try_delete_session_cache.rs @@ -3,7 +3,7 @@ use log::info; use redis_common::redis_cache_keys::RedisCacheKeys; -use crate::server_state::ServerState; +use crate::state::server_state::ServerState; pub fn try_delete_session_cache( http_request: &HttpRequest, diff --git a/crates/service/web/storyteller_web/src/main.rs b/crates/service/web/storyteller_web/src/main.rs index 9016f366dc..88c2615584 100644 --- a/crates/service/web/storyteller_web/src/main.rs +++ b/crates/service/web/storyteller_web/src/main.rs @@ -76,10 +76,10 @@ use crate::billing::stripe_internal_user_lookup_impl::StripeInternalUserLookupIm use crate::configs::app_startup::redis_rate_limiters::configure_redis_rate_limiters; use crate::configs::static_api_tokens::StaticApiTokenSet; use crate::http_server::middleware::pushback_filter_middleware::PushbackFilter; +use crate::http_server::routes::add_routes::add_routes; use crate::http_server::web_utils::handle_multipart_error::handle_multipart_error; use crate::memory_cache::model_token_to_info_cache::ModelTokenToInfoCache; -use crate::http_server::routes::add_routes::add_routes; -use crate::server_state::{DurableInMemoryCaches, EnvConfig, EphemeralInMemoryCaches, InMemoryCaches, ServerInfo, ServerState, StaticFeatureFlags, StripeSettings, TrollBans}; +use crate::state::server_state::{DurableInMemoryCaches, EnvConfig, EphemeralInMemoryCaches, InMemoryCaches, ServerInfo, ServerState, StaticFeatureFlags, StripeSettings, TrollBans}; use crate::threads::db_health_checker_thread::db_health_check_status::HealthCheckStatus; use crate::threads::db_health_checker_thread::db_health_checker_thread::db_health_checker_thread; use crate::threads::poll_ip_banlist_thread::poll_ip_bans; @@ -96,7 +96,7 @@ pub mod configs; pub mod http_server; pub mod memory_cache; pub mod model; -pub mod server_state; +pub mod state; pub mod threads; pub mod util; diff --git a/crates/service/web/storyteller_web/src/state/mod.rs b/crates/service/web/storyteller_web/src/state/mod.rs new file mode 100644 index 0000000000..e387fb76b9 --- /dev/null +++ b/crates/service/web/storyteller_web/src/state/mod.rs @@ -0,0 +1 @@ +pub mod server_state; \ No newline at end of file diff --git a/crates/service/web/storyteller_web/src/server_state.rs b/crates/service/web/storyteller_web/src/state/server_state.rs similarity index 100% rename from crates/service/web/storyteller_web/src/server_state.rs rename to crates/service/web/storyteller_web/src/state/server_state.rs diff --git a/crates/service/web/storyteller_web/src/util/allowed_studio_access.rs b/crates/service/web/storyteller_web/src/util/allowed_studio_access.rs index 49bc28cc66..1b67505cfe 100644 --- a/crates/service/web/storyteller_web/src/util/allowed_studio_access.rs +++ b/crates/service/web/storyteller_web/src/util/allowed_studio_access.rs @@ -3,7 +3,7 @@ use mysql_queries::queries::users::user_sessions::get_user_session_by_token::Ses use users_component::session::lookup::user_session_extended::UserSessionExtended; use users_component::session::lookup::user_session_feature_flags::UserSessionFeatureFlags; -use crate::server_state::StaticFeatureFlags; +use crate::state::server_state::StaticFeatureFlags; /// Check whether we should allow the request access to Storyteller Studio features. pub fn allowed_studio_access(maybe_session: Option, flags: &StaticFeatureFlags) -> bool { diff --git a/crates/service/web/storyteller_web/src/util/allowed_video_style_transfer_access.rs b/crates/service/web/storyteller_web/src/util/allowed_video_style_transfer_access.rs index 60e9598615..9c995bbb00 100644 --- a/crates/service/web/storyteller_web/src/util/allowed_video_style_transfer_access.rs +++ b/crates/service/web/storyteller_web/src/util/allowed_video_style_transfer_access.rs @@ -3,7 +3,7 @@ use mysql_queries::queries::users::user_sessions::get_user_session_by_token::Ses use users_component::session::lookup::user_session_extended::UserSessionExtended; use users_component::session::lookup::user_session_feature_flags::UserSessionFeatureFlags; -use crate::server_state::StaticFeatureFlags; +use crate::state::server_state::StaticFeatureFlags; /// Check whether we should allow the request access to video style transfer pub fn allowed_video_style_transfer_access(maybe_session: Option, flags: &StaticFeatureFlags) -> bool {