Skip to content

Commit 386a802

Browse files
authored
Merge branch 'main' into random-project-easter-egg
2 parents 8b89889 + 6859509 commit 386a802

26 files changed

+74
-68
lines changed

apps/labrinth/tests/common/api_common/generic.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use labrinth::models::{
77
teams::{OrganizationPermissions, ProjectPermissions},
88
};
99

10-
use ariadne::{api_v2::ApiV2, api_v3::ApiV3, dummy_data::TestFile};
10+
use crate::common::{api_v2::ApiV2, api_v3::ApiV3, dummy_data::TestFile};
1111

1212
use super::{
1313
models::{CommonProject, CommonVersion},
@@ -81,7 +81,7 @@ delegate_api_variant!(
8181
[add_gallery_item, ServiceResponse, id_or_slug: &str, image: ImageData, featured: bool, title: Option<String>, description: Option<String>, ordering: Option<i32>, pat: Option<&str>],
8282
[remove_gallery_item, ServiceResponse, id_or_slug: &str, image_url: &str, pat: Option<&str>],
8383
[edit_gallery_item, ServiceResponse, id_or_slug: &str, image_url: &str, patch: HashMap<String, String>, pat: Option<&str>],
84-
[create_report, ServiceResponse, report_type: &str, id: &str, item_type: ariadne::api_common::models::CommonItemType, body: &str, pat: Option<&str>],
84+
[create_report, ServiceResponse, report_type: &str, id: &str, item_type: crate::common::api_common::models::CommonItemType, body: &str, pat: Option<&str>],
8585
[get_report, ServiceResponse, id: &str, pat: Option<&str>],
8686
[get_reports, ServiceResponse, ids: &[&str], pat: Option<&str>],
8787
[get_user_reports, ServiceResponse, pat: Option<&str>],
@@ -100,28 +100,28 @@ delegate_api_variant!(
100100
#[async_trait(?Send)]
101101
impl ApiTags for GenericApi {
102102
[get_loaders, ServiceResponse,],
103-
[get_loaders_deserialized_common, Vec<ariadne::api_common::models::CommonLoaderData>,],
103+
[get_loaders_deserialized_common, Vec<crate::common::api_common::models::CommonLoaderData>,],
104104
[get_categories, ServiceResponse,],
105-
[get_categories_deserialized_common, Vec<ariadne::api_common::models::CommonCategoryData>,],
105+
[get_categories_deserialized_common, Vec<crate::common::api_common::models::CommonCategoryData>,],
106106
}
107107
);
108108

109109
delegate_api_variant!(
110110
#[async_trait(?Send)]
111111
impl ApiTeams for GenericApi {
112112
[get_team_members, ServiceResponse, team_id: &str, pat: Option<&str>],
113-
[get_team_members_deserialized_common, Vec<ariadne::api_common::models::CommonTeamMember>, team_id: &str, pat: Option<&str>],
113+
[get_team_members_deserialized_common, Vec<crate::common::api_common::models::CommonTeamMember>, team_id: &str, pat: Option<&str>],
114114
[get_teams_members, ServiceResponse, ids: &[&str], pat: Option<&str>],
115115
[get_project_members, ServiceResponse, id_or_slug: &str, pat: Option<&str>],
116-
[get_project_members_deserialized_common, Vec<ariadne::api_common::models::CommonTeamMember>, id_or_slug: &str, pat: Option<&str>],
116+
[get_project_members_deserialized_common, Vec<crate::common::api_common::models::CommonTeamMember>, id_or_slug: &str, pat: Option<&str>],
117117
[get_organization_members, ServiceResponse, id_or_title: &str, pat: Option<&str>],
118-
[get_organization_members_deserialized_common, Vec<ariadne::api_common::models::CommonTeamMember>, id_or_title: &str, pat: Option<&str>],
118+
[get_organization_members_deserialized_common, Vec<crate::common::api_common::models::CommonTeamMember>, id_or_title: &str, pat: Option<&str>],
119119
[join_team, ServiceResponse, team_id: &str, pat: Option<&str>],
120120
[remove_from_team, ServiceResponse, team_id: &str, user_id: &str, pat: Option<&str>],
121121
[edit_team_member, ServiceResponse, team_id: &str, user_id: &str, patch: serde_json::Value, pat: Option<&str>],
122122
[transfer_team_ownership, ServiceResponse, team_id: &str, user_id: &str, pat: Option<&str>],
123123
[get_user_notifications, ServiceResponse, user_id: &str, pat: Option<&str>],
124-
[get_user_notifications_deserialized_common, Vec<ariadne::api_common::models::CommonNotification>, user_id: &str, pat: Option<&str>],
124+
[get_user_notifications_deserialized_common, Vec<crate::common::api_common::models::CommonNotification>, user_id: &str, pat: Option<&str>],
125125
[get_notification, ServiceResponse, notification_id: &str, pat: Option<&str>],
126126
[get_notifications, ServiceResponse, ids: &[&str], pat: Option<&str>],
127127
[mark_notification_read, ServiceResponse, notification_id: &str, pat: Option<&str>],

apps/labrinth/tests/common/api_common/request_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use labrinth::util::actix::MultipartSegment;
55

6-
use ariadne::dummy_data::TestFile;
6+
use crate::common::dummy_data::TestFile;
77

88
#[allow(dead_code)]
99
pub struct ProjectCreationRequestData {

apps/labrinth/tests/common/api_v2/project.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use labrinth::{
2424
};
2525
use serde_json::json;
2626

27-
use ariadne::database::MOD_USER_PAT;
27+
use crate::common::database::MOD_USER_PAT;
2828

2929
use super::{
3030
request_data::{self, get_public_project_creation_data},

apps/labrinth/tests/common/api_v2/request_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(dead_code)]
22
use serde_json::json;
33

4-
use ariadne::{
4+
use crate::common::{
55
api_common::request_data::{
66
ProjectCreationRequestData, VersionCreationRequestData,
77
},

apps/labrinth/tests/common/api_v2/user.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::ApiV2;
2+
use crate::common::api_common::{Api, ApiUser, AppendsOptionalPat};
23
use actix_web::{dev::ServiceResponse, test};
3-
use ariadne::api_common::{Api, ApiUser, AppendsOptionalPat};
44
use async_trait::async_trait;
55

66
#[async_trait(?Send)]

apps/labrinth/tests/common/api_v3/request_data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(dead_code)]
22
use serde_json::json;
33

4-
use ariadne::{
4+
use crate::common::{
55
api_common::request_data::{
66
ProjectCreationRequestData, VersionCreationRequestData,
77
},

apps/labrinth/tests/common/api_v3/user.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use actix_web::{dev::ServiceResponse, test};
22
use async_trait::async_trait;
33

4-
use ariadne::api_common::{Api, ApiUser, AppendsOptionalPat};
4+
use crate::common::api_common::{Api, ApiUser, AppendsOptionalPat};
55

66
use super::ApiV3;
77

apps/labrinth/tests/common/asserts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(dead_code)]
22

3-
use ariadne::get_json_val_str;
3+
use crate::common::get_json_val_str;
44
use itertools::Itertools;
55
use labrinth::models::v3::projects::Version;
66

apps/labrinth/tests/common/database.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use sqlx::{postgres::PgPoolOptions, PgPool};
55
use std::time::Duration;
66
use url::Url;
77

8-
use ariadne::{dummy_data, environment::TestEnvironment};
8+
use crate::common::{dummy_data, environment::TestEnvironment};
99

1010
use super::{api_v3::ApiV3, dummy_data::DUMMY_DATA_UPDATE};
1111

apps/labrinth/tests/common/permissions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use itertools::Itertools;
66
use labrinth::models::teams::{OrganizationPermissions, ProjectPermissions};
77
use serde_json::json;
88

9-
use ariadne::{
9+
use crate::common::{
1010
api_common::ApiTeams,
1111
database::{generate_random_name, ADMIN_USER_PAT},
1212
};

0 commit comments

Comments
 (0)