mirror of
https://github.com/modrinth/code.git
synced 2026-09-02 13:05:50 +00:00
Show orgs in project card when a project is owned by an org (#5892)
* fix: link to user using id instead of username * feat: show org in project card * fix: account for outdated documents * refactor: use struct to store owner information * fix: default new fields * fix lint
This commit is contained in:
@@ -228,6 +228,9 @@ pub struct UploadSearchProject {
|
||||
pub project_types: Vec<String>,
|
||||
pub slug: Option<String>,
|
||||
pub author: String,
|
||||
pub author_id: String,
|
||||
pub organization: Option<String>,
|
||||
pub organization_id: Option<String>,
|
||||
pub indexed_author: String,
|
||||
pub name: String,
|
||||
pub indexed_name: String,
|
||||
@@ -279,6 +282,12 @@ pub struct ResultSearchProject {
|
||||
pub project_types: Vec<String>,
|
||||
pub slug: Option<String>,
|
||||
pub author: String,
|
||||
#[serde(default)]
|
||||
pub author_id: Option<String>,
|
||||
#[serde(default)]
|
||||
pub organization: Option<String>,
|
||||
#[serde(default)]
|
||||
pub organization_id: Option<String>,
|
||||
pub name: String,
|
||||
pub summary: String,
|
||||
pub categories: Vec<String>,
|
||||
@@ -315,6 +324,9 @@ impl From<UploadSearchProject> for ResultSearchProject {
|
||||
project_types: source.project_types,
|
||||
slug: source.slug,
|
||||
author: source.author,
|
||||
author_id: Some(source.author_id),
|
||||
organization: source.organization,
|
||||
organization_id: source.organization_id,
|
||||
name: source.name,
|
||||
summary: source.summary,
|
||||
categories: source.categories,
|
||||
|
||||
Reference in New Issue
Block a user