added project modal, portal, and backend code to get description

This commit is contained in:
2025-12-21 15:19:30 -05:00
parent 3e24c3936a
commit 02d1c4b784
7 changed files with 58 additions and 58 deletions

View File

@@ -1,4 +1,4 @@
use sqlx::{FromRow, Pool, Postgres, Row};
use sqlx::{Pool, Postgres};
use crate::routes::projects::Project;
@@ -7,7 +7,7 @@ impl ProjectsDatasource {
pub async fn get_all(pool: &Pool<Postgres>) -> Result<Vec<Project>, sqlx::Error> {
sqlx::query_as!(
Project,
"SELECT project_id, title, repo, summary, tech, wip, created_at FROM projects p WHERE deleted_at IS NULL ORDER BY p.created_at DESC"
"SELECT project_id, title, repo, summary, description, tech, wip, created_at FROM projects p WHERE deleted_at IS NULL ORDER BY p.created_at DESC"
)
.fetch_all(pool)
.await

View File

@@ -9,6 +9,7 @@ pub struct Project {
pub title: String,
pub repo: Option<String>,
pub summary: String,
pub description: Option<String>,
pub tech: String,
pub wip: Option<bool>,
#[serde(serialize_with = "serialize_datetime")]
@@ -66,5 +67,3 @@ impl ProjectsRoute {
}
}
}