More project data (#406)

* More project data

* Array_agg fixes + cleanup

* fix prepare

* Add approval dates to search

* Update migrations/20220725204351_more-project-data.sql

Co-authored-by: wafflecoffee <emmaffle@modrinth.com>

* Add category labels + display categories

Co-authored-by: wafflecoffee <emmaffle@modrinth.com>
This commit is contained in:
Geometrically
2022-07-31 13:29:20 -07:00
committed by GitHub
parent 13335cadc6
commit b04bced37f
38 changed files with 3673 additions and 3517 deletions

View File

@@ -9,10 +9,10 @@ use crate::routes::ApiError;
use crate::util::auth::get_user_from_headers;
use crate::{database, models};
use actix_web::{delete, get, web, HttpRequest, HttpResponse};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use sqlx::PgPool;
use std::sync::Arc;
use time::OffsetDateTime;
/// A specific version of a mod
#[derive(Serialize, Deserialize)]
@@ -25,8 +25,7 @@ pub struct LegacyVersion {
pub version_number: String,
pub changelog: String,
pub changelog_url: Option<String>,
#[serde(with = "crate::util::time_ser")]
pub date_published: OffsetDateTime,
pub date_published: DateTime<Utc>,
pub downloads: u32,
pub version_type: VersionType,
pub files: Vec<VersionFile>,