diff --git a/phono-server/src/routes/relations_single/add_field_handler.rs b/phono-server/src/routes/relations_single/add_field_handler.rs index 3fe97d9..fbf60ae 100644 --- a/phono-server/src/routes/relations_single/add_field_handler.rs +++ b/phono-server/src/routes/relations_single/add_field_handler.rs @@ -17,7 +17,7 @@ use sqlx::{postgres::types::Oid, query}; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, navigator::{Navigator, NavigatorPage}, presentation_form::PresentationForm, @@ -73,7 +73,7 @@ impl From for PresentationForm { /// /// This handler expects 3 path parameters with the structure described by /// [`PathParams`]. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( State(mut pooler): State, AppDbConn(mut app_db): AppDbConn, diff --git a/phono-server/src/routes/relations_single/form_handler.rs b/phono-server/src/routes/relations_single/form_handler.rs index ff8379e..c34a4ce 100644 --- a/phono-server/src/routes/relations_single/form_handler.rs +++ b/phono-server/src/routes/relations_single/form_handler.rs @@ -22,7 +22,7 @@ use strum::IntoEnumIterator as _; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, field_info::FormFieldInfo, navigator::{Navigator, NavigatorPage as _}, @@ -41,7 +41,7 @@ pub(super) struct PathParams { } /// HTTP GET handler for the top-level portal form builder page. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn get( State(settings): State, CurrentUser(user): CurrentUser, diff --git a/phono-server/src/routes/relations_single/insert_handler.rs b/phono-server/src/routes/relations_single/insert_handler.rs index 7529f11..3f33fba 100644 --- a/phono-server/src/routes/relations_single/insert_handler.rs +++ b/phono-server/src/routes/relations_single/insert_handler.rs @@ -18,7 +18,7 @@ use sqlx::{postgres::types::Oid, query}; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::{AppError, forbidden}, navigator::{Navigator, NavigatorPage as _}, user::CurrentUser, @@ -37,7 +37,7 @@ pub(super) struct PathParams { /// to insert multiple rows at once. If any key is repeated, the others should /// be repeated the same number of times. Form values are expected to be JSON- /// serialized representations of the `[Datum]` type. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( State(mut workspace_pooler): State, AppDbConn(mut app_db): AppDbConn, diff --git a/phono-server/src/routes/relations_single/portal_settings_handler.rs b/phono-server/src/routes/relations_single/portal_settings_handler.rs index e08f3db..e3f357c 100644 --- a/phono-server/src/routes/relations_single/portal_settings_handler.rs +++ b/phono-server/src/routes/relations_single/portal_settings_handler.rs @@ -14,7 +14,7 @@ use sqlx::postgres::types::Oid; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, navigator::{Navigator, NavigatorPage as _}, settings::Settings, @@ -31,7 +31,7 @@ pub(super) struct PathParams { } /// HTTP GET handler for portal settings, including renaming and deletion. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn get( State(settings): State, CurrentUser(user): CurrentUser, diff --git a/phono-server/src/routes/relations_single/remove_field_handler.rs b/phono-server/src/routes/relations_single/remove_field_handler.rs index 6cfa639..bbe3c1c 100644 --- a/phono-server/src/routes/relations_single/remove_field_handler.rs +++ b/phono-server/src/routes/relations_single/remove_field_handler.rs @@ -14,7 +14,7 @@ use uuid::Uuid; use validator::Validate; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::{AppError, bad_request}, extractors::ValidatedForm, navigator::{Navigator, NavigatorPage}, @@ -41,7 +41,7 @@ pub(super) struct FormBody { /// /// This handler expects 3 path parameters with the structure described by /// [`PathParams`]. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( AppDbConn(mut app_db): AppDbConn, State(mut pooler): State, diff --git a/phono-server/src/routes/relations_single/set_filter_handler.rs b/phono-server/src/routes/relations_single/set_filter_handler.rs index e14d9c9..de7eb64 100644 --- a/phono-server/src/routes/relations_single/set_filter_handler.rs +++ b/phono-server/src/routes/relations_single/set_filter_handler.rs @@ -16,7 +16,7 @@ use sqlx::postgres::types::Oid; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, navigator::{Navigator, NavigatorPage as _}, user::CurrentUser, @@ -40,7 +40,7 @@ pub(super) struct FormBody { /// /// This handler expects 3 path parameters with the structure described by /// [`PathParams`]. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( AppDbConn(mut app_db): AppDbConn, State(mut pooler): State, diff --git a/phono-server/src/routes/relations_single/settings_handler.rs b/phono-server/src/routes/relations_single/settings_handler.rs index 0c21414..453c3df 100644 --- a/phono-server/src/routes/relations_single/settings_handler.rs +++ b/phono-server/src/routes/relations_single/settings_handler.rs @@ -11,7 +11,7 @@ use sqlx::postgres::types::Oid; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, navigator::Navigator, settings::Settings, @@ -28,7 +28,7 @@ pub(super) struct PathParams { /// HTTP GET handler for table settings, including renaming, access control, /// and deletion. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn get( State(settings): State, CurrentUser(user): CurrentUser, diff --git a/phono-server/src/routes/relations_single/settings_invite_handler.rs b/phono-server/src/routes/relations_single/settings_invite_handler.rs index f4a4ff5..e8afc0f 100644 --- a/phono-server/src/routes/relations_single/settings_invite_handler.rs +++ b/phono-server/src/routes/relations_single/settings_invite_handler.rs @@ -9,7 +9,7 @@ use sqlx::postgres::types::Oid; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, navigator::{Navigator, NavigatorPage as _}, user::CurrentUser, @@ -28,7 +28,7 @@ pub(super) struct FormBody { /// HTTP POST handler for inviting another Phonograph user to collaborate on a /// relation, by email address. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( AppDbConn(mut app_db): AppDbConn, CurrentUser(user): CurrentUser, diff --git a/phono-server/src/routes/relations_single/update_field_handler.rs b/phono-server/src/routes/relations_single/update_field_handler.rs index ce47887..f71a894 100644 --- a/phono-server/src/routes/relations_single/update_field_handler.rs +++ b/phono-server/src/routes/relations_single/update_field_handler.rs @@ -14,7 +14,7 @@ use uuid::Uuid; use validator::Validate; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, extractors::ValidatedForm, navigator::{Navigator, NavigatorPage}, @@ -66,7 +66,7 @@ impl From for PresentationForm { /// /// This handler expects 3 path parameters with the structure described by /// [`PathParams`]. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( State(mut pooler): State, AppDbConn(mut app_db): AppDbConn, diff --git a/phono-server/src/routes/relations_single/update_field_ordinality_handler.rs b/phono-server/src/routes/relations_single/update_field_ordinality_handler.rs index 8bdcde3..000c251 100644 --- a/phono-server/src/routes/relations_single/update_field_ordinality_handler.rs +++ b/phono-server/src/routes/relations_single/update_field_ordinality_handler.rs @@ -6,7 +6,7 @@ use uuid::Uuid; use validator::Validate; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, extractors::ValidatedForm, navigator::{Navigator, NavigatorPage}, @@ -34,7 +34,7 @@ pub(super) struct FormBody { /// /// This handler expects 3 path parameters with the structure described by /// [`PathParams`]. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( AppDbConn(mut app_db): AppDbConn, CurrentUser(_user): CurrentUser, diff --git a/phono-server/src/routes/relations_single/update_form_transitions_handler.rs b/phono-server/src/routes/relations_single/update_form_transitions_handler.rs index 581a691..ac52953 100644 --- a/phono-server/src/routes/relations_single/update_form_transitions_handler.rs +++ b/phono-server/src/routes/relations_single/update_form_transitions_handler.rs @@ -10,7 +10,7 @@ use sqlx::postgres::types::Oid; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::{AppError, bad_request}, navigator::{Navigator, NavigatorPage as _}, user::CurrentUser, @@ -36,7 +36,7 @@ pub(super) struct FormBody { /// /// Upon success, the client is redirected back to the portal's form editor /// page. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( AppDbConn(mut app_db): AppDbConn, CurrentUser(_user): CurrentUser, diff --git a/phono-server/src/routes/relations_single/update_portal_name_handler.rs b/phono-server/src/routes/relations_single/update_portal_name_handler.rs index 1194801..4ebb10f 100644 --- a/phono-server/src/routes/relations_single/update_portal_name_handler.rs +++ b/phono-server/src/routes/relations_single/update_portal_name_handler.rs @@ -13,7 +13,7 @@ use uuid::Uuid; use validator::Validate; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, extractors::ValidatedForm, navigator::{Navigator, NavigatorPage as _}, @@ -35,7 +35,7 @@ pub(super) struct FormBody { } /// HTTP POST handler for updating a portal's name. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( AppDbConn(mut app_db): AppDbConn, State(mut pooler): State, diff --git a/phono-server/src/routes/relations_single/update_prompts_handler.rs b/phono-server/src/routes/relations_single/update_prompts_handler.rs index 3ee9c8b..2143bb7 100644 --- a/phono-server/src/routes/relations_single/update_prompts_handler.rs +++ b/phono-server/src/routes/relations_single/update_prompts_handler.rs @@ -19,7 +19,7 @@ use sqlx::postgres::types::Oid; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::{AppError, bad_request}, navigator::{Navigator, NavigatorPage as _}, user::CurrentUser, @@ -39,7 +39,7 @@ pub(super) struct PathParams { /// /// Upon success, the client is redirected back to the portal's form editor /// page. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( State(mut workspace_pooler): State, AppDbConn(mut app_db): AppDbConn, diff --git a/phono-server/src/routes/relations_single/update_rel_name_handler.rs b/phono-server/src/routes/relations_single/update_rel_name_handler.rs index a1989ec..66f47ee 100644 --- a/phono-server/src/routes/relations_single/update_rel_name_handler.rs +++ b/phono-server/src/routes/relations_single/update_rel_name_handler.rs @@ -13,7 +13,6 @@ use uuid::Uuid; use validator::Validate; use crate::{ - app::App, errors::AppError, extractors::ValidatedForm, navigator::{Navigator, NavigatorPage as _}, @@ -39,7 +38,7 @@ pub(super) struct FormBody { /// /// Currently, names must begin with a letter and may only contain lowercase /// alphanumeric characters and underscores. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( State(mut pooler): State, CurrentUser(user): CurrentUser, diff --git a/phono-server/src/routes/relations_single/update_values_handler.rs b/phono-server/src/routes/relations_single/update_values_handler.rs index e73d5ae..6deea7b 100644 --- a/phono-server/src/routes/relations_single/update_values_handler.rs +++ b/phono-server/src/routes/relations_single/update_values_handler.rs @@ -18,7 +18,7 @@ use sqlx::{Acquire as _, postgres::types::Oid, query}; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::{AppError, forbidden}, user::CurrentUser, workspace_pooler::{RoleAssignment, WorkspacePooler}, @@ -47,7 +47,7 @@ pub(super) struct CellInfo { /// /// This handler expects 3 path parameters with the structure described by /// [`PathParams`]. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( State(mut workspace_pooler): State, AppDbConn(mut app_db): AppDbConn, diff --git a/phono-server/src/routes/workspaces_single/add_service_credential_handler.rs b/phono-server/src/routes/workspaces_single/add_service_credential_handler.rs index 6cb5ff4..1061bd6 100644 --- a/phono-server/src/routes/workspaces_single/add_service_credential_handler.rs +++ b/phono-server/src/routes/workspaces_single/add_service_credential_handler.rs @@ -18,7 +18,7 @@ use sqlx::query; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, navigator::{Navigator, NavigatorPage}, user::CurrentUser, @@ -33,7 +33,7 @@ pub(super) struct PathParams { /// HTTP POST handler for generating a new "service credential" role for a user /// and workspace. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( State(mut pooler): State, AppDbConn(mut app_db): AppDbConn, diff --git a/phono-server/src/routes/workspaces_single/nav_handler.rs b/phono-server/src/routes/workspaces_single/nav_handler.rs index a5d9659..f6b5469 100644 --- a/phono-server/src/routes/workspaces_single/nav_handler.rs +++ b/phono-server/src/routes/workspaces_single/nav_handler.rs @@ -12,7 +12,7 @@ use serde::Deserialize; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, navigator::Navigator, settings::Settings, @@ -29,7 +29,7 @@ pub(super) struct PathParams { /// HTTP GET handler for a top-level workspace navigation page. At the moment, /// this is pretty spare---essentially the workspace navigation sidebar blown /// up to the size of a full page. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn get( State(settings): State, CurrentUser(user): CurrentUser, diff --git a/phono-server/src/routes/workspaces_single/service_credentials_handler.rs b/phono-server/src/routes/workspaces_single/service_credentials_handler.rs index 503c455..e752e76 100644 --- a/phono-server/src/routes/workspaces_single/service_credentials_handler.rs +++ b/phono-server/src/routes/workspaces_single/service_credentials_handler.rs @@ -17,7 +17,7 @@ use url::Url; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, navigator::Navigator, roles::RoleDisplay, @@ -35,7 +35,7 @@ pub(super) struct PathParams { /// HTTP GET handler for the page at which a user manages their service /// credentials for a workspace. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn get( State(settings): State, State(mut pooler): State, diff --git a/phono-server/src/routes/workspaces_single/settings_handler.rs b/phono-server/src/routes/workspaces_single/settings_handler.rs index 3aee8de..72a50ce 100644 --- a/phono-server/src/routes/workspaces_single/settings_handler.rs +++ b/phono-server/src/routes/workspaces_single/settings_handler.rs @@ -12,7 +12,7 @@ use serde::Deserialize; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, navigator::Navigator, settings::Settings, @@ -28,7 +28,7 @@ pub(super) struct PathParams { /// HTTP GET handler for workspace settings, including renaming, access control, /// and deletion. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn get( State(settings): State, CurrentUser(user): CurrentUser, diff --git a/phono-server/src/routes/workspaces_single/update_name_handler.rs b/phono-server/src/routes/workspaces_single/update_name_handler.rs index 6815800..b5304e6 100644 --- a/phono-server/src/routes/workspaces_single/update_name_handler.rs +++ b/phono-server/src/routes/workspaces_single/update_name_handler.rs @@ -10,7 +10,7 @@ use uuid::Uuid; use validator::Validate; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, extractors::ValidatedForm, navigator::{Navigator, NavigatorPage as _}, @@ -29,7 +29,7 @@ pub(super) struct FormBody { } /// HTTP POST handler for updating a workspace's name. -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( State(mut pooler): State, AppDbConn(mut app_db): AppDbConn, diff --git a/phono-server/src/routes/workspaces_single/update_service_cred_permissions_handler.rs b/phono-server/src/routes/workspaces_single/update_service_cred_permissions_handler.rs index a1c20c7..fb78b9d 100644 --- a/phono-server/src/routes/workspaces_single/update_service_cred_permissions_handler.rs +++ b/phono-server/src/routes/workspaces_single/update_service_cred_permissions_handler.rs @@ -17,7 +17,7 @@ use sqlx::query; use uuid::Uuid; use crate::{ - app::{App, AppDbConn}, + app::AppDbConn, errors::AppError, navigator::{Navigator, NavigatorPage}, roles::{get_reader_role, get_writer_role}, @@ -33,7 +33,7 @@ pub(super) struct PathParams { } /// HTTP POST handler for assigning -#[debug_handler(state = App)] +#[debug_handler(state = crate::app::App)] pub(super) async fn post( State(mut pooler): State, AppDbConn(mut app_db): AppDbConn,