Used the wrong sign on the date check.
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tavern"
|
name = "tavern"
|
||||||
version = "0.2.8"
|
version = "0.2.9"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "A blogging system that will allow you to write your blog in Markdown and then display it in HTML using Dioxus."
|
description = "A blogging system that will allow you to write your blog in Markdown and then display it in HTML using Dioxus."
|
||||||
repository = "/CyberMages/tavern"
|
repository = "/CyberMages/tavern"
|
||||||
|
|||||||
@ -345,7 +345,7 @@ impl Database
|
|||||||
.map_err(|e| sqlx::Error::Decode(e.into()))?;
|
.map_err(|e| sqlx::Error::Decode(e.into()))?;
|
||||||
|
|
||||||
// Only give tales that are ready to be published.
|
// Only give tales that are ready to be published.
|
||||||
if current_time <= publish_date
|
if current_time >= publish_date
|
||||||
{
|
{
|
||||||
let tags_str: Option<String> = row.try_get("tags")?;
|
let tags_str: Option<String> = row.try_get("tags")?;
|
||||||
let tags = tags_str.map(|s| s.split(',').map(String::from).collect())
|
let tags = tags_str.map(|s| s.split(',').map(String::from).collect())
|
||||||
@ -395,7 +395,7 @@ impl Database
|
|||||||
let publish_date = chrono::NaiveDateTime::parse_from_str(&date_str, "%Y-%m-%d %H:%M:%S")
|
let publish_date = chrono::NaiveDateTime::parse_from_str(&date_str, "%Y-%m-%d %H:%M:%S")
|
||||||
.map_err(|e| Error::Decode(e.into()))?;
|
.map_err(|e| Error::Decode(e.into()))?;
|
||||||
|
|
||||||
if current_time > publish_date
|
if current_time < publish_date
|
||||||
{
|
{
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user