You've already forked AstralRinth
forked from xxxOFFxxx/AstralRinth
Misc v3 linear tasks (#767)
* v3_reroute 404 error * hash change * fixed issue with error conversion * added new model confirmation tests + title name change * renaming, fields * owner; test changes * clippy prepare * fmt * merge fixes * clippy * working merge * revs * merge fixes
This commit is contained in:
@@ -12,7 +12,7 @@ const COLLECTIONS_NAMESPACE: &str = "collections";
|
||||
pub struct CollectionBuilder {
|
||||
pub collection_id: CollectionId,
|
||||
pub user_id: UserId,
|
||||
pub title: String,
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
pub status: CollectionStatus,
|
||||
pub projects: Vec<ProjectId>,
|
||||
@@ -25,7 +25,7 @@ impl CollectionBuilder {
|
||||
) -> Result<CollectionId, DatabaseError> {
|
||||
let collection_struct = Collection {
|
||||
id: self.collection_id,
|
||||
title: self.title,
|
||||
name: self.name,
|
||||
user_id: self.user_id,
|
||||
description: self.description,
|
||||
created: Utc::now(),
|
||||
@@ -44,7 +44,7 @@ impl CollectionBuilder {
|
||||
pub struct Collection {
|
||||
pub id: CollectionId,
|
||||
pub user_id: UserId,
|
||||
pub title: String,
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
pub created: DateTime<Utc>,
|
||||
pub updated: DateTime<Utc>,
|
||||
@@ -62,7 +62,7 @@ impl Collection {
|
||||
sqlx::query!(
|
||||
"
|
||||
INSERT INTO collections (
|
||||
id, user_id, title, description,
|
||||
id, user_id, name, description,
|
||||
created, icon_url, status
|
||||
)
|
||||
VALUES (
|
||||
@@ -72,7 +72,7 @@ impl Collection {
|
||||
",
|
||||
self.id as CollectionId,
|
||||
self.user_id as UserId,
|
||||
&self.title,
|
||||
&self.name,
|
||||
&self.description,
|
||||
self.created,
|
||||
self.icon_url.as_ref(),
|
||||
@@ -190,7 +190,7 @@ impl Collection {
|
||||
remaining_collections.iter().map(|x| x.0).collect();
|
||||
let db_collections: Vec<Collection> = sqlx::query!(
|
||||
"
|
||||
SELECT c.id id, c.title title, c.description description,
|
||||
SELECT c.id id, c.name name, c.description description,
|
||||
c.icon_url icon_url, c.color color, c.created created, c.user_id user_id,
|
||||
c.updated updated, c.status status,
|
||||
ARRAY_AGG(DISTINCT cm.mod_id) filter (where cm.mod_id is not null) mods
|
||||
@@ -209,7 +209,7 @@ impl Collection {
|
||||
Collection {
|
||||
id: CollectionId(id),
|
||||
user_id: UserId(m.user_id),
|
||||
title: m.title.clone(),
|
||||
name: m.name.clone(),
|
||||
description: m.description.clone(),
|
||||
icon_url: m.icon_url.clone(),
|
||||
color: m.color.map(|x| x as u32),
|
||||
|
||||
Reference in New Issue
Block a user