Labrinth ID cleanup (#3681)

* Put all ID types in the labrinth::models::ids, and reduce code duplication with them

* Rewrite labrinth::database::models::ids and rename most DB interface ID structs to be prefixed with DB

* Run sqlx prepare

---------

Co-authored-by: Alejandro González <7822554+AlexTMjugador@users.noreply.github.com>
This commit is contained in:
Josiah Glosson
2025-05-22 03:34:36 -05:00
committed by GitHub
parent c6022ad977
commit 9e527ff141
111 changed files with 1477 additions and 1965 deletions

View File

@@ -1,22 +1,22 @@
#![allow(dead_code)]
use std::io::{Cursor, Write};
use actix_http::StatusCode;
use actix_web::test::{self, TestRequest};
use labrinth::models::{
oauth_clients::OAuthClient,
organizations::Organization,
pats::Scopes,
projects::{Project, ProjectId, Version},
};
use serde_json::json;
use sqlx::Executor;
use zip::{CompressionMethod, ZipWriter, write::FileOptions};
use crate::{
assert_status,
common::{api_common::Api, api_v3, database::USER_USER_PAT},
};
use actix_http::StatusCode;
use actix_web::test::{self, TestRequest};
use labrinth::models::ids::ProjectId;
use labrinth::models::{
oauth_clients::OAuthClient,
organizations::Organization,
pats::Scopes,
projects::{Project, Version},
};
use serde_json::json;
use sqlx::Executor;
use zip::{CompressionMethod, ZipWriter, write::FileOptions};
use super::{
api_common::{ApiProject, AppendsOptionalPat, request_data::ImageData},