You've already forked AstralRinth
forked from didirus/AstralRinth
Fix checks
This commit is contained in:
2
.github/workflows/turbo-ci.yml
vendored
2
.github/workflows/turbo-ci.yml
vendored
@@ -62,6 +62,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
|
env:
|
||||||
|
SQLX_OFFLINE: true
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: pnpm lint
|
run: pnpm lint
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ use serde::Deserialize;
|
|||||||
// as the environment generator for both uses common fields.
|
// as the environment generator for both uses common fields.
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonProject {
|
pub struct CommonProject {
|
||||||
// For example, for CommonProject, we do not include:
|
// For example, for CommonProject, we do not include:
|
||||||
// - game_versions (v2 only)
|
// - game_versions (v2 only)
|
||||||
@@ -62,6 +63,7 @@ pub struct CommonProject {
|
|||||||
pub monetization_status: MonetizationStatus,
|
pub monetization_status: MonetizationStatus,
|
||||||
}
|
}
|
||||||
#[derive(Deserialize, Clone)]
|
#[derive(Deserialize, Clone)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonVersion {
|
pub struct CommonVersion {
|
||||||
pub id: VersionId,
|
pub id: VersionId,
|
||||||
pub loaders: Vec<String>,
|
pub loaders: Vec<String>,
|
||||||
@@ -81,6 +83,7 @@ pub struct CommonVersion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonLoaderData {
|
pub struct CommonLoaderData {
|
||||||
pub icon: String,
|
pub icon: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
@@ -88,6 +91,7 @@ pub struct CommonLoaderData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonCategoryData {
|
pub struct CommonCategoryData {
|
||||||
pub icon: String,
|
pub icon: String,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
@@ -97,6 +101,7 @@ pub struct CommonCategoryData {
|
|||||||
|
|
||||||
/// A member of a team
|
/// A member of a team
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonTeamMember {
|
pub struct CommonTeamMember {
|
||||||
pub team_id: TeamId,
|
pub team_id: TeamId,
|
||||||
pub user: User,
|
pub user: User,
|
||||||
@@ -110,6 +115,7 @@ pub struct CommonTeamMember {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonNotification {
|
pub struct CommonNotification {
|
||||||
pub id: NotificationId,
|
pub id: NotificationId,
|
||||||
pub user_id: UserId,
|
pub user_id: UserId,
|
||||||
@@ -122,6 +128,7 @@ pub struct CommonNotification {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonNotificationAction {
|
pub struct CommonNotificationAction {
|
||||||
pub action_route: (String, String),
|
pub action_route: (String, String),
|
||||||
}
|
}
|
||||||
@@ -147,6 +154,7 @@ impl CommonItemType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonReport {
|
pub struct CommonReport {
|
||||||
pub id: ReportId,
|
pub id: ReportId,
|
||||||
pub report_type: String,
|
pub report_type: String,
|
||||||
@@ -168,6 +176,7 @@ pub enum LegacyItemType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonThread {
|
pub struct CommonThread {
|
||||||
pub id: ThreadId,
|
pub id: ThreadId,
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
@@ -179,6 +188,7 @@ pub struct CommonThread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonThreadMessage {
|
pub struct CommonThreadMessage {
|
||||||
pub id: ThreadMessageId,
|
pub id: ThreadMessageId,
|
||||||
pub author_id: Option<UserId>,
|
pub author_id: Option<UserId>,
|
||||||
@@ -187,6 +197,7 @@ pub struct CommonThreadMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub enum CommonMessageBody {
|
pub enum CommonMessageBody {
|
||||||
Text {
|
Text {
|
||||||
body: String,
|
body: String,
|
||||||
@@ -206,6 +217,7 @@ pub enum CommonMessageBody {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub enum CommonThreadType {
|
pub enum CommonThreadType {
|
||||||
Report,
|
Report,
|
||||||
Project,
|
Project,
|
||||||
@@ -213,6 +225,7 @@ pub enum CommonThreadType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct CommonUser {
|
pub struct CommonUser {
|
||||||
pub id: UserId,
|
pub id: UserId,
|
||||||
pub username: String,
|
pub username: String,
|
||||||
|
|||||||
@@ -5,18 +5,21 @@ use labrinth::util::actix::MultipartSegment;
|
|||||||
|
|
||||||
use crate::common::dummy_data::TestFile;
|
use crate::common::dummy_data::TestFile;
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct ProjectCreationRequestData {
|
pub struct ProjectCreationRequestData {
|
||||||
pub slug: String,
|
pub slug: String,
|
||||||
pub jar: Option<TestFile>,
|
pub jar: Option<TestFile>,
|
||||||
pub segment_data: Vec<MultipartSegment>,
|
pub segment_data: Vec<MultipartSegment>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct VersionCreationRequestData {
|
pub struct VersionCreationRequestData {
|
||||||
pub version: String,
|
pub version: String,
|
||||||
pub jar: Option<TestFile>,
|
pub jar: Option<TestFile>,
|
||||||
pub segment_data: Vec<MultipartSegment>,
|
pub segment_data: Vec<MultipartSegment>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct ImageData {
|
pub struct ImageData {
|
||||||
pub filename: String,
|
pub filename: String,
|
||||||
pub extension: String,
|
pub extension: String,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use labrinth::models::teams::ProjectPermissions;
|
|||||||
use labrinth::util::actix::{MultipartSegment, MultipartSegmentData};
|
use labrinth::util::actix::{MultipartSegment, MultipartSegmentData};
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
use crate::common::api_common::models::{CommonItemType, CommonProject};
|
use crate::common::api_common::models::CommonProject;
|
||||||
use crate::common::api_common::request_data::ProjectCreationRequestData;
|
use crate::common::api_common::request_data::ProjectCreationRequestData;
|
||||||
use crate::common::api_common::{ApiProject, ApiTeams, ApiVersion};
|
use crate::common::api_common::{ApiProject, ApiTeams, ApiVersion};
|
||||||
use crate::common::dummy_data::{
|
use crate::common::dummy_data::{
|
||||||
@@ -1343,7 +1343,7 @@ async fn projects_various_visibility() {
|
|||||||
for (pat, expected_count) in visible_pat_pairs {
|
for (pat, expected_count) in visible_pat_pairs {
|
||||||
let projects = env
|
let projects = env
|
||||||
.api
|
.api
|
||||||
.get_projects(&[&alpha_project_id, &beta_project_id], pat)
|
.get_projects(&[alpha_project_id, beta_project_id], pat)
|
||||||
.await;
|
.await;
|
||||||
let projects: Vec<CommonProject> =
|
let projects: Vec<CommonProject> =
|
||||||
test::read_body_json(projects).await;
|
test::read_body_json(projects).await;
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
"VERCEL_*",
|
"VERCEL_*",
|
||||||
"CF_PAGES_*",
|
"CF_PAGES_*",
|
||||||
"HEROKU_APP_NAME",
|
"HEROKU_APP_NAME",
|
||||||
"STRIPE_PUBLISHABLE_KEY"
|
"STRIPE_PUBLISHABLE_KEY",
|
||||||
|
"SQLX_OFFLINE"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"lint": {},
|
"lint": {},
|
||||||
|
|||||||
Reference in New Issue
Block a user