Used the wrong sign on the date check.
This commit is contained in:
@ -345,7 +345,7 @@ impl Database
|
||||
.map_err(|e| sqlx::Error::Decode(e.into()))?;
|
||||
|
||||
// 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 = 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")
|
||||
.map_err(|e| Error::Decode(e.into()))?;
|
||||
|
||||
if current_time > publish_date
|
||||
if current_time < publish_date
|
||||
{
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user