mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-08 09:24:17 +00:00
fmt
This commit is contained in:
parent
ee945fec98
commit
876346781b
|
@ -55,13 +55,14 @@ impl Crud for Post {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Ignores unpublished scheduled posts
|
/// Ignores unpublished scheduled posts
|
||||||
async fn read(
|
async fn read(pool: &mut DbPool<'_>, id: Self::IdType) -> Result<Option<Self>, Error> {
|
||||||
pool: &mut DbPool<'_>
|
|
||||||
, id: Self::IdType
|
|
||||||
) -> Result<Option<Self>, Error> {
|
|
||||||
let conn = &mut *get_conn(pool).await?;
|
let conn = &mut *get_conn(pool).await?;
|
||||||
post::table.find(id)
|
post::table
|
||||||
.filter(post::scheduled_time.is_null()).first(conn).await.optional()
|
.find(id)
|
||||||
|
.filter(post::scheduled_time.is_null())
|
||||||
|
.first(conn)
|
||||||
|
.await
|
||||||
|
.optional()
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn update(
|
async fn update(
|
||||||
|
|
Loading…
Reference in a new issue