feat(labrinth): database seed data fixtures for better installation and testing (#4132)

* feat(labrinth): database seed data fixtures for better installation and testing

* chore(labrinth): simplify and fixup seed data fixture

* docs(contributing/labrinth): enable all useful features for `sqlx-cli` install

* chore(docs/labrinth): fix typo

* chore(docs/labrinth): fix `cargo fmt` parameter typo

* chore: replace Labrinth -> labrinth
This commit is contained in:
Alejandro González
2025-08-09 16:51:04 +02:00
committed by GitHub
parent 8af65f58d9
commit 3b8cd661bc
11 changed files with 1137 additions and 48 deletions

View File

@@ -763,7 +763,7 @@ pub async fn try_update_playtime(path: &str) -> crate::Result<()> {
let updated_recent_playtime = profile.recent_time_played;
let res = if updated_recent_playtime > 0 {
// Create update struct to send to Labrinth
// Create update struct to send to labrinth
let modrinth_pack_version_id =
profile.linked_data.as_ref().map(|l| l.version_id.clone());
let playtime_update_json = json!({

View File

@@ -198,7 +198,7 @@ pub async fn finish_login_flow(
semaphore: &FetchSemaphore,
exec: impl sqlx::Executor<'_, Database = sqlx::Sqlite>,
) -> crate::Result<ModrinthCredentials> {
// The authorization code actually is the access token, since Labrinth doesn't
// The authorization code actually is the access token, since labrinth doesn't
// issue separate authorization codes. Therefore, this is equivalent to an
// implicit OAuth grant flow, and no additional exchanging or finalization is
// needed. TODO not do this for the reasons outlined at