This commit is contained in:
Felix Ableitner 2024-09-16 15:32:21 +02:00
parent ee945fec98
commit 876346781b

View file

@ -55,13 +55,14 @@ impl Crud for Post {
}
/// Ignores unpublished scheduled posts
async fn read(
pool: &mut DbPool<'_>
, id: Self::IdType
) -> Result<Option<Self>, Error> {
async fn read(pool: &mut DbPool<'_>, id: Self::IdType) -> Result<Option<Self>, Error> {
let conn = &mut *get_conn(pool).await?;
post::table.find(id)
.filter(post::scheduled_time.is_null()).first(conn).await.optional()
post::table
.find(id)
.filter(post::scheduled_time.is_null())
.first(conn)
.await
.optional()
}
async fn update(