Add published_at to entries, begin to support pagination

Articles will be sorted by their published_at dates for now.
This commit is contained in:
2023-06-08 01:20:21 -04:00
parent 3f29138bd1
commit 758e644173
6 changed files with 106 additions and 36 deletions

View File

@@ -1,5 +1,6 @@
use anyhow::Result;
use argh::FromArgs;
use chrono::Utc;
use dotenvy::dotenv;
use sqlx::postgres::PgPoolOptions;
use std::env;
@@ -125,6 +126,7 @@ pub async fn main() -> Result<()> {
description: args.description,
html_content: None,
feed_id: args.feed_id,
published_at: Utc::now().naive_utc(),
},
)
.await?;