diff --git a/apps/labrinth/tests/common/api_common/generic.rs b/apps/labrinth/tests/common/api_common/generic.rs index 0edd96f76..f07a153e8 100644 --- a/apps/labrinth/tests/common/api_common/generic.rs +++ b/apps/labrinth/tests/common/api_common/generic.rs @@ -7,7 +7,7 @@ use labrinth::models::{ teams::{OrganizationPermissions, ProjectPermissions}, }; -use ariadne::{api_v2::ApiV2, api_v3::ApiV3, dummy_data::TestFile}; +use crate::common::{api_v2::ApiV2, api_v3::ApiV3, dummy_data::TestFile}; use super::{ models::{CommonProject, CommonVersion}, @@ -81,7 +81,7 @@ delegate_api_variant!( [add_gallery_item, ServiceResponse, id_or_slug: &str, image: ImageData, featured: bool, title: Option, description: Option, ordering: Option, pat: Option<&str>], [remove_gallery_item, ServiceResponse, id_or_slug: &str, image_url: &str, pat: Option<&str>], [edit_gallery_item, ServiceResponse, id_or_slug: &str, image_url: &str, patch: HashMap, pat: Option<&str>], - [create_report, ServiceResponse, report_type: &str, id: &str, item_type: ariadne::api_common::models::CommonItemType, body: &str, pat: Option<&str>], + [create_report, ServiceResponse, report_type: &str, id: &str, item_type: crate::common::api_common::models::CommonItemType, body: &str, pat: Option<&str>], [get_report, ServiceResponse, id: &str, pat: Option<&str>], [get_reports, ServiceResponse, ids: &[&str], pat: Option<&str>], [get_user_reports, ServiceResponse, pat: Option<&str>], @@ -100,9 +100,9 @@ delegate_api_variant!( #[async_trait(?Send)] impl ApiTags for GenericApi { [get_loaders, ServiceResponse,], - [get_loaders_deserialized_common, Vec,], + [get_loaders_deserialized_common, Vec,], [get_categories, ServiceResponse,], - [get_categories_deserialized_common, Vec,], + [get_categories_deserialized_common, Vec,], } ); @@ -110,18 +110,18 @@ delegate_api_variant!( #[async_trait(?Send)] impl ApiTeams for GenericApi { [get_team_members, ServiceResponse, team_id: &str, pat: Option<&str>], - [get_team_members_deserialized_common, Vec, team_id: &str, pat: Option<&str>], + [get_team_members_deserialized_common, Vec, team_id: &str, pat: Option<&str>], [get_teams_members, ServiceResponse, ids: &[&str], pat: Option<&str>], [get_project_members, ServiceResponse, id_or_slug: &str, pat: Option<&str>], - [get_project_members_deserialized_common, Vec, id_or_slug: &str, pat: Option<&str>], + [get_project_members_deserialized_common, Vec, id_or_slug: &str, pat: Option<&str>], [get_organization_members, ServiceResponse, id_or_title: &str, pat: Option<&str>], - [get_organization_members_deserialized_common, Vec, id_or_title: &str, pat: Option<&str>], + [get_organization_members_deserialized_common, Vec, id_or_title: &str, pat: Option<&str>], [join_team, ServiceResponse, team_id: &str, pat: Option<&str>], [remove_from_team, ServiceResponse, team_id: &str, user_id: &str, pat: Option<&str>], [edit_team_member, ServiceResponse, team_id: &str, user_id: &str, patch: serde_json::Value, pat: Option<&str>], [transfer_team_ownership, ServiceResponse, team_id: &str, user_id: &str, pat: Option<&str>], [get_user_notifications, ServiceResponse, user_id: &str, pat: Option<&str>], - [get_user_notifications_deserialized_common, Vec, user_id: &str, pat: Option<&str>], + [get_user_notifications_deserialized_common, Vec, user_id: &str, pat: Option<&str>], [get_notification, ServiceResponse, notification_id: &str, pat: Option<&str>], [get_notifications, ServiceResponse, ids: &[&str], pat: Option<&str>], [mark_notification_read, ServiceResponse, notification_id: &str, pat: Option<&str>], diff --git a/apps/labrinth/tests/common/api_common/request_data.rs b/apps/labrinth/tests/common/api_common/request_data.rs index e04a381d6..eb3a78136 100644 --- a/apps/labrinth/tests/common/api_common/request_data.rs +++ b/apps/labrinth/tests/common/api_common/request_data.rs @@ -3,7 +3,7 @@ use labrinth::util::actix::MultipartSegment; -use ariadne::dummy_data::TestFile; +use crate::common::dummy_data::TestFile; #[allow(dead_code)] pub struct ProjectCreationRequestData { diff --git a/apps/labrinth/tests/common/api_v2/project.rs b/apps/labrinth/tests/common/api_v2/project.rs index c4960dd00..df268fcaf 100644 --- a/apps/labrinth/tests/common/api_v2/project.rs +++ b/apps/labrinth/tests/common/api_v2/project.rs @@ -24,7 +24,7 @@ use labrinth::{ }; use serde_json::json; -use ariadne::database::MOD_USER_PAT; +use crate::common::database::MOD_USER_PAT; use super::{ request_data::{self, get_public_project_creation_data}, diff --git a/apps/labrinth/tests/common/api_v2/request_data.rs b/apps/labrinth/tests/common/api_v2/request_data.rs index 9deb64907..8eced3618 100644 --- a/apps/labrinth/tests/common/api_v2/request_data.rs +++ b/apps/labrinth/tests/common/api_v2/request_data.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] use serde_json::json; -use ariadne::{ +use crate::common::{ api_common::request_data::{ ProjectCreationRequestData, VersionCreationRequestData, }, diff --git a/apps/labrinth/tests/common/api_v2/user.rs b/apps/labrinth/tests/common/api_v2/user.rs index 2202f94b2..7031b66f4 100644 --- a/apps/labrinth/tests/common/api_v2/user.rs +++ b/apps/labrinth/tests/common/api_v2/user.rs @@ -1,6 +1,6 @@ use super::ApiV2; +use crate::common::api_common::{Api, ApiUser, AppendsOptionalPat}; use actix_web::{dev::ServiceResponse, test}; -use ariadne::api_common::{Api, ApiUser, AppendsOptionalPat}; use async_trait::async_trait; #[async_trait(?Send)] diff --git a/apps/labrinth/tests/common/api_v3/request_data.rs b/apps/labrinth/tests/common/api_v3/request_data.rs index a18ebe636..790503b86 100644 --- a/apps/labrinth/tests/common/api_v3/request_data.rs +++ b/apps/labrinth/tests/common/api_v3/request_data.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] use serde_json::json; -use ariadne::{ +use crate::common::{ api_common::request_data::{ ProjectCreationRequestData, VersionCreationRequestData, }, diff --git a/apps/labrinth/tests/common/api_v3/user.rs b/apps/labrinth/tests/common/api_v3/user.rs index 43a8b794b..9e2c9f7fd 100644 --- a/apps/labrinth/tests/common/api_v3/user.rs +++ b/apps/labrinth/tests/common/api_v3/user.rs @@ -1,7 +1,7 @@ use actix_web::{dev::ServiceResponse, test}; use async_trait::async_trait; -use ariadne::api_common::{Api, ApiUser, AppendsOptionalPat}; +use crate::common::api_common::{Api, ApiUser, AppendsOptionalPat}; use super::ApiV3; diff --git a/apps/labrinth/tests/common/asserts.rs b/apps/labrinth/tests/common/asserts.rs index 0fac4b915..f4b7330e7 100644 --- a/apps/labrinth/tests/common/asserts.rs +++ b/apps/labrinth/tests/common/asserts.rs @@ -1,6 +1,6 @@ #![allow(dead_code)] -use ariadne::get_json_val_str; +use crate::common::get_json_val_str; use itertools::Itertools; use labrinth::models::v3::projects::Version; diff --git a/apps/labrinth/tests/common/database.rs b/apps/labrinth/tests/common/database.rs index cdef16846..f4d96fd5b 100644 --- a/apps/labrinth/tests/common/database.rs +++ b/apps/labrinth/tests/common/database.rs @@ -5,7 +5,7 @@ use sqlx::{postgres::PgPoolOptions, PgPool}; use std::time::Duration; use url::Url; -use ariadne::{dummy_data, environment::TestEnvironment}; +use crate::common::{dummy_data, environment::TestEnvironment}; use super::{api_v3::ApiV3, dummy_data::DUMMY_DATA_UPDATE}; diff --git a/apps/labrinth/tests/common/permissions.rs b/apps/labrinth/tests/common/permissions.rs index ec8996ce7..02b119353 100644 --- a/apps/labrinth/tests/common/permissions.rs +++ b/apps/labrinth/tests/common/permissions.rs @@ -6,7 +6,7 @@ use itertools::Itertools; use labrinth::models::teams::{OrganizationPermissions, ProjectPermissions}; use serde_json::json; -use ariadne::{ +use crate::common::{ api_common::ApiTeams, database::{generate_random_name, ADMIN_USER_PAT}, }; diff --git a/apps/labrinth/tests/loader_fields.rs b/apps/labrinth/tests/loader_fields.rs index b4390cf50..78ee67a40 100644 --- a/apps/labrinth/tests/loader_fields.rs +++ b/apps/labrinth/tests/loader_fields.rs @@ -9,11 +9,13 @@ use labrinth::database::models::legacy_loader_fields::MinecraftGameVersion; use labrinth::models::v3; use serde_json::json; -use ariadne::api_common::{ApiProject, ApiVersion}; -use ariadne::api_v3::request_data::get_public_project_creation_data; -use ariadne::database::*; +use crate::common::api_common::{ApiProject, ApiVersion}; +use crate::common::api_v3::request_data::get_public_project_creation_data; +use crate::common::database::*; -use ariadne::dummy_data::{DummyProjectAlpha, DummyProjectBeta, TestFile}; +use crate::common::dummy_data::{ + DummyProjectAlpha, DummyProjectBeta, TestFile, +}; // importing common module. mod common; diff --git a/apps/labrinth/tests/notifications.rs b/apps/labrinth/tests/notifications.rs index b314f247e..d63fc819a 100644 --- a/apps/labrinth/tests/notifications.rs +++ b/apps/labrinth/tests/notifications.rs @@ -3,7 +3,7 @@ use common::{ environment::with_test_environment_all, }; -use ariadne::api_common::ApiTeams; +use crate::common::api_common::ApiTeams; mod common; diff --git a/apps/labrinth/tests/organizations.rs b/apps/labrinth/tests/organizations.rs index 4e50c31d6..1a570b358 100644 --- a/apps/labrinth/tests/organizations.rs +++ b/apps/labrinth/tests/organizations.rs @@ -1,5 +1,4 @@ -use actix_http::StatusCode; -use ariadne::{ +use crate::common::{ api_common::{ApiProject, ApiTeams}, database::{ generate_random_name, ADMIN_USER_PAT, ENEMY_USER_ID_PARSED, @@ -10,6 +9,7 @@ use ariadne::{ DummyImage, DummyOrganizationZeta, DummyProjectAlpha, DummyProjectBeta, }, }; +use actix_http::StatusCode; use common::{ api_v3::ApiV3, database::{FRIEND_USER_ID, FRIEND_USER_PAT, USER_USER_PAT}, diff --git a/apps/labrinth/tests/pats.rs b/apps/labrinth/tests/pats.rs index 2ef22a2eb..07b130f9e 100644 --- a/apps/labrinth/tests/pats.rs +++ b/apps/labrinth/tests/pats.rs @@ -6,7 +6,7 @@ use common::{database::*, environment::with_test_environment_all}; use labrinth::models::pats::Scopes; use serde_json::json; -use ariadne::api_common::AppendsOptionalPat; +use crate::common::api_common::AppendsOptionalPat; mod common; diff --git a/apps/labrinth/tests/project.rs b/apps/labrinth/tests/project.rs index 1a9e42766..8ee34ca20 100644 --- a/apps/labrinth/tests/project.rs +++ b/apps/labrinth/tests/project.rs @@ -18,10 +18,10 @@ use labrinth::models::teams::ProjectPermissions; use labrinth::util::actix::{MultipartSegment, MultipartSegmentData}; use serde_json::json; -use ariadne::api_common::models::CommonProject; -use ariadne::api_common::request_data::ProjectCreationRequestData; -use ariadne::api_common::{ApiProject, ApiTeams, ApiVersion}; -use ariadne::dummy_data::{ +use crate::common::api_common::models::CommonProject; +use crate::common::api_common::request_data::ProjectCreationRequestData; +use crate::common::api_common::{ApiProject, ApiTeams, ApiVersion}; +use crate::common::dummy_data::{ DummyImage, DummyOrganizationZeta, DummyProjectAlpha, DummyProjectBeta, TestFile, }; diff --git a/apps/labrinth/tests/scopes.rs b/apps/labrinth/tests/scopes.rs index b6c95008e..460998bf7 100644 --- a/apps/labrinth/tests/scopes.rs +++ b/apps/labrinth/tests/scopes.rs @@ -1,11 +1,13 @@ use std::collections::HashMap; -use actix_http::StatusCode; -use actix_web::test; -use ariadne::api_common::{ +use crate::common::api_common::{ ApiProject, ApiTeams, ApiUser, ApiVersion, AppendsOptionalPat, }; -use ariadne::dummy_data::{DummyImage, DummyProjectAlpha, DummyProjectBeta}; +use crate::common::dummy_data::{ + DummyImage, DummyProjectAlpha, DummyProjectBeta, +}; +use actix_http::StatusCode; +use actix_web::test; use ariadne::ids::base62_impl::parse_base62; use chrono::{Duration, Utc}; use common::api_common::models::CommonItemType; diff --git a/apps/labrinth/tests/tags.rs b/apps/labrinth/tests/tags.rs index 283f6d78c..264c7e29e 100644 --- a/apps/labrinth/tests/tags.rs +++ b/apps/labrinth/tests/tags.rs @@ -7,7 +7,7 @@ use common::{ }, }; -use ariadne::api_common::ApiTags; +use crate::common::api_common::ApiTags; mod common; diff --git a/apps/labrinth/tests/teams.rs b/apps/labrinth/tests/teams.rs index 73a6669d0..4743ecf4c 100644 --- a/apps/labrinth/tests/teams.rs +++ b/apps/labrinth/tests/teams.rs @@ -1,5 +1,5 @@ +use crate::common::{api_common::ApiTeams, database::*}; use actix_http::StatusCode; -use ariadne::{api_common::ApiTeams, database::*}; use common::{ api_v3::ApiV3, environment::{ diff --git a/apps/labrinth/tests/user.rs b/apps/labrinth/tests/user.rs index 3939304cb..b1b7bfd01 100644 --- a/apps/labrinth/tests/user.rs +++ b/apps/labrinth/tests/user.rs @@ -1,4 +1,4 @@ -use ariadne::api_common::{ApiProject, ApiTeams}; +use crate::common::api_common::{ApiProject, ApiTeams}; use common::dummy_data::TestFile; use common::{ database::{FRIEND_USER_ID, FRIEND_USER_PAT, USER_USER_ID, USER_USER_PAT}, diff --git a/apps/labrinth/tests/v2/error.rs b/apps/labrinth/tests/v2/error.rs index ad6274b65..1ae56a719 100644 --- a/apps/labrinth/tests/v2/error.rs +++ b/apps/labrinth/tests/v2/error.rs @@ -1,12 +1,12 @@ use crate::assert_status; -use ariadne::api_common::ApiProject; +use crate::common::api_common::ApiProject; use actix_http::StatusCode; use actix_web::test; use bytes::Bytes; -use ariadne::database::USER_USER_PAT; -use ariadne::{ +use crate::common::database::USER_USER_PAT; +use crate::common::{ api_v2::ApiV2, environment::{with_test_environment, TestEnvironment}, }; diff --git a/apps/labrinth/tests/v2/notifications.rs b/apps/labrinth/tests/v2/notifications.rs index 5f9835cb6..692ae1388 100644 --- a/apps/labrinth/tests/v2/notifications.rs +++ b/apps/labrinth/tests/v2/notifications.rs @@ -1,4 +1,4 @@ -use ariadne::{ +use crate::common::{ api_common::ApiTeams, api_v2::ApiV2, database::{FRIEND_USER_ID, FRIEND_USER_PAT, USER_USER_PAT}, diff --git a/apps/labrinth/tests/v2/scopes.rs b/apps/labrinth/tests/v2/scopes.rs index a3a32d892..693d4af57 100644 --- a/apps/labrinth/tests/v2/scopes.rs +++ b/apps/labrinth/tests/v2/scopes.rs @@ -1,12 +1,12 @@ -use ariadne::api_common::ApiProject; -use ariadne::api_common::ApiVersion; -use ariadne::api_v2::request_data::get_public_project_creation_data; -use ariadne::api_v2::ApiV2; -use ariadne::dummy_data::TestFile; -use ariadne::environment::with_test_environment; -use ariadne::environment::TestEnvironment; +use crate::common::api_common::ApiProject; +use crate::common::api_common::ApiVersion; +use crate::common::api_v2::request_data::get_public_project_creation_data; +use crate::common::api_v2::ApiV2; +use crate::common::dummy_data::TestFile; +use crate::common::environment::with_test_environment; +use crate::common::environment::TestEnvironment; +use crate::common::scopes::ScopeTest; use ariadne::ids::base62_impl::parse_base62; -use ariadne::scopes::ScopeTest; use labrinth::models::pats::Scopes; use labrinth::models::projects::ProjectId; diff --git a/apps/labrinth/tests/v2/search.rs b/apps/labrinth/tests/v2/search.rs index b52f40554..09116697f 100644 --- a/apps/labrinth/tests/v2/search.rs +++ b/apps/labrinth/tests/v2/search.rs @@ -1,15 +1,15 @@ use crate::assert_status; -use ariadne::api_common::Api; -use ariadne::api_common::ApiProject; -use ariadne::api_common::ApiVersion; -use ariadne::api_v2::ApiV2; +use crate::common::api_common::Api; +use crate::common::api_common::ApiProject; +use crate::common::api_common::ApiVersion; +use crate::common::api_v2::ApiV2; +use crate::common::database::*; +use crate::common::dummy_data::TestFile; +use crate::common::dummy_data::DUMMY_CATEGORIES; +use crate::common::environment::with_test_environment; +use crate::common::environment::TestEnvironment; use actix_http::StatusCode; -use ariadne::database::*; -use ariadne::dummy_data::TestFile; -use ariadne::dummy_data::DUMMY_CATEGORIES; -use ariadne::environment::with_test_environment; -use ariadne::environment::TestEnvironment; use ariadne::ids::base62_impl::parse_base62; use futures::stream::StreamExt; use serde_json::json; diff --git a/apps/labrinth/tests/v2/tags.rs b/apps/labrinth/tests/v2/tags.rs index 70b292bce..1171e6502 100644 --- a/apps/labrinth/tests/v2/tags.rs +++ b/apps/labrinth/tests/v2/tags.rs @@ -3,7 +3,7 @@ use labrinth::routes::v2::tags::DonationPlatformQueryData; use std::collections::HashSet; -use ariadne::{ +use crate::common::{ api_v2::ApiV2, environment::{with_test_environment, TestEnvironment}, }; diff --git a/apps/labrinth/tests/v2/version.rs b/apps/labrinth/tests/v2/version.rs index 31a386b53..b4195bef6 100644 --- a/apps/labrinth/tests/v2/version.rs +++ b/apps/labrinth/tests/v2/version.rs @@ -9,13 +9,13 @@ use labrinth::{ use serde_json::json; use crate::assert_status; -use ariadne::api_common::{ApiProject, ApiVersion}; -use ariadne::api_v2::ApiV2; +use crate::common::api_common::{ApiProject, ApiVersion}; +use crate::common::api_v2::ApiV2; -use ariadne::api_v2::request_data::get_public_project_creation_data; -use ariadne::dummy_data::{DummyProjectAlpha, DummyProjectBeta}; -use ariadne::environment::{with_test_environment, TestEnvironment}; -use ariadne::{ +use crate::common::api_v2::request_data::get_public_project_creation_data; +use crate::common::dummy_data::{DummyProjectAlpha, DummyProjectBeta}; +use crate::common::environment::{with_test_environment, TestEnvironment}; +use crate::common::{ database::{ENEMY_USER_PAT, USER_USER_PAT}, dummy_data::TestFile, }; diff --git a/apps/labrinth/tests/version.rs b/apps/labrinth/tests/version.rs index 08d2dcd65..24a6a71dd 100644 --- a/apps/labrinth/tests/version.rs +++ b/apps/labrinth/tests/version.rs @@ -1,11 +1,13 @@ use std::collections::HashMap; +use crate::common::api_common::ApiVersion; +use crate::common::database::*; +use crate::common::dummy_data::{ + DummyProjectAlpha, DummyProjectBeta, TestFile, +}; +use crate::common::get_json_val_str; use actix_http::StatusCode; use actix_web::test; -use ariadne::api_common::ApiVersion; -use ariadne::database::*; -use ariadne::dummy_data::{DummyProjectAlpha, DummyProjectBeta, TestFile}; -use ariadne::get_json_val_str; use ariadne::ids::base62_impl::parse_base62; use common::api_v3::ApiV3; use common::asserts::assert_common_version_ids;