add: drawings in questions
This commit is contained in:
parent
6be729de50
commit
16843a6ab8
28 changed files with 1181 additions and 32 deletions
|
@ -1952,6 +1952,15 @@ impl DataManager {
|
|||
self.delete_poll(y.poll_id, &user).await?;
|
||||
}
|
||||
|
||||
// delete question (if not global question)
|
||||
if y.context.answering != 0 {
|
||||
let question = self.get_question_by_id(y.context.answering).await?;
|
||||
|
||||
if !question.is_global {
|
||||
self.delete_question(question.id, &user).await?;
|
||||
}
|
||||
}
|
||||
|
||||
// return
|
||||
Ok(())
|
||||
}
|
||||
|
@ -2031,6 +2040,15 @@ impl DataManager {
|
|||
for upload in y.uploads {
|
||||
self.delete_upload(upload).await?;
|
||||
}
|
||||
|
||||
// delete question (if not global question)
|
||||
if y.context.answering != 0 {
|
||||
let question = self.get_question_by_id(y.context.answering).await?;
|
||||
|
||||
if !question.is_global {
|
||||
self.delete_question(question.id, &user).await?;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// incr parent comment count
|
||||
if let Some(replying_to) = y.replying_to {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue