Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ members = [
"packages/modrinth-util",
"packages/neverbounce",
"packages/path-util",
"packages/serde-binhum",
"packages/xredis",
]

Expand Down Expand Up @@ -183,6 +184,7 @@ sentry = { version = "0.45.0", default-features = false, features = [
"rustls",
] }
serde = "1.0.228"
serde-binhum = { path = "packages/serde-binhum" }
serde_bytes = "0.11.19"
serde_cbor = "0.11.2"
serde_ini = "0.2.0"
Expand Down
6 changes: 2 additions & 4 deletions apps/frontend/src/pages/[type]/[project].vue
Original file line number Diff line number Diff line change
Expand Up @@ -2014,9 +2014,7 @@ const navLinks = computed(() => {
label: formatMessage(messages.changelogTab),
href: withInstallContextQuery(`${projectUrl}/changelog`),
shown:
hasVersions.value &&
projectV3Loaded.value &&
projectV3.value?.minecraft_server === undefined,
hasVersions.value && projectV3Loaded.value && projectV3.value?.minecraft_server == null,
onHover: loadVersions,
},
{
Expand All @@ -2025,7 +2023,7 @@ const navLinks = computed(() => {
shown:
(hasVersions.value || !!currentMember.value) &&
projectV3Loaded.value &&
projectV3.value?.minecraft_server === undefined,
projectV3.value?.minecraft_server == null,
subpages: [`${projectUrl}/version/`],
onHover: loadVersions,
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion apps/labrinth/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
- no trailing punctuation
- wrap code items e.g. type names in backticks
- Prefer `wrap_internal_err`, `wrap_request_err` when attaching context to an existing error (like Anyhow `context` or Eyre `wrap_err`)
- Prefer importing `eyre::Result` and using `Result<T>` instead of `eyre::Result<T>`
- Prefer `eyre::Ok(value)` instead of `Ok::<_, eyre::Report>(value)` when an explicit Eyre result type is needed
- All operations should ideally have some context attached
- Database operations can have a message like `.wrap_internal_err("failed to fetch XYZ")`
- Database operations can have a message like `.wrap_internal_err("fetching XYZ")`
- You can perform real-time queries against the databases in the Docker Compose
- `docker exec labrinth-postgres psql -c "select 1"`
- `docker exec labrinth-redis redis-cli flushall`
Expand Down
1 change: 1 addition & 0 deletions apps/labrinth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ rusty-money = { workspace = true }
scalar_api_reference = { workspace = true, features = ["actix-web"] }
sentry = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde-binhum = { workspace = true }
serde_json = { workspace = true }
serde_with = { workspace = true }
sha1 = { workspace = true }
Expand Down
6 changes: 0 additions & 6 deletions apps/labrinth/src/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ pub enum AuthenticationError {
Url,
}

impl From<xredis::Error> for AuthenticationError {
fn from(error: xredis::Error) -> Self {
Self::Database(error.into())
}
}

impl actix_web::ResponseError for AuthenticationError {
fn status_code(&self) -> StatusCode {
match self {
Expand Down
2 changes: 1 addition & 1 deletion apps/labrinth/src/database/models/analytics_event_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
};
use serde::{Deserialize, Serialize};

const ANALYTICS_EVENTS_NAMESPACE: &str = "analytics_events:v3";
const ANALYTICS_EVENTS_NAMESPACE: &str = "analytics_events:v4";
const ANALYTICS_EVENTS_ALL_KEY: &str = "all";

#[derive(Debug, Clone, Serialize, Deserialize)]
Expand Down
2 changes: 1 addition & 1 deletion apps/labrinth/src/database/models/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use super::ids::*;
use futures::TryStreamExt;
use serde::{Deserialize, Serialize};

const TAGS_NAMESPACE: &str = "tags:v3";
const TAGS_NAMESPACE: &str = "tags:v4";

pub struct ProjectType {
pub id: ProjectTypeId,
Expand Down
2 changes: 1 addition & 1 deletion apps/labrinth/src/database/models/collection_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use futures::TryStreamExt;
use serde::{Deserialize, Serialize};
use xredis::RedisPool;

const COLLECTIONS_NAMESPACE: &str = "collections:v3";
const COLLECTIONS_NAMESPACE: &str = "collections:v4";

#[derive(Clone)]
pub struct CollectionBuilder {
Expand Down
Loading
Loading