diff --git a/src/blog.rs b/src/blog.rs index 2287dc1..b94466e 100644 --- a/src/blog.rs +++ b/src/blog.rs @@ -84,6 +84,8 @@ impl Post { // post is not found in PostsList, it must not be found // here either; if a post is found in PostsList, then // this method should not return any error. + // (except for hidden posts, in which case they won't be + // present in PostsList) pub async fn find_by_uuid(uuid: &str) -> MyResult { store::get_obj(&Self::uuid_to_post_key(uuid)).await } diff --git a/src/sn.rs b/src/sn.rs index c94c31f..4423637 100644 --- a/src/sn.rs +++ b/src/sn.rs @@ -34,6 +34,7 @@ async fn get_actions(_req: Request, url: Url) -> MyResult { // Show different options depending on whether the post already exists // Use Post here because PostsList is larger to read into memory // also slower to check one-by-one + // (also, because it may be a hidden post that does not live in PostsList) let post = match params.get("item_uuid") { Some(uuid) => match blog::Post::find_by_uuid(&uuid).await { Ok(post) => Some(post),