Add crawl metadata to feed & improve model interface

This commit is contained in:
2023-07-15 00:36:44 -04:00
parent 0fa0cfc508
commit 4837cbb903
18 changed files with 621 additions and 522 deletions

View File

@@ -7,7 +7,7 @@ use sqlx::PgPool;
use crate::config::Config;
use crate::error::Result;
use crate::models::entry::get_entry;
use crate::models::entry::Entry;
use crate::partials::layout::Layout;
use crate::uuid::Base62Uuid;
@@ -17,7 +17,7 @@ pub async fn get(
State(config): State<Config>,
layout: Layout,
) -> Result<Response> {
let entry = get_entry(&pool, id.as_uuid()).await?;
let entry = Entry::get(&pool, id.as_uuid()).await?;
let content_dir = std::path::Path::new(&config.content_dir);
let content_path = content_dir.join(format!("{}.html", entry.entry_id));
Ok(layout.render(html! {