add: product uploads
This commit is contained in:
parent
292d302304
commit
3b5b0ce1a1
8 changed files with 27 additions and 7 deletions
|
@ -45,7 +45,11 @@ impl DataManager {
|
|||
question: &Question,
|
||||
) -> Result<Option<(User, Post)>> {
|
||||
Ok(if let Some(id) = question.context.asking_about {
|
||||
let post = self.get_post_by_id(id).await?;
|
||||
let post = match self.get_post_by_id(id).await {
|
||||
Ok(x) => x,
|
||||
Err(_) => return Ok(None),
|
||||
};
|
||||
|
||||
Some((self.get_user_by_id(post.owner).await?, post))
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue