mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:39:53 +01:00
Prevent error when creating questions
This error didn't prevent the question from being sent.
This commit is contained in:
parent
1a29a19e9d
commit
d403cdde75
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ module UseCase
|
|||
increment_asked_count
|
||||
|
||||
inbox = ::Inbox.create!(user: target_user, question:, new: true)
|
||||
notify
|
||||
notify(inbox)
|
||||
|
||||
{
|
||||
status: 201,
|
||||
|
@ -75,7 +75,7 @@ module UseCase
|
|||
)
|
||||
end
|
||||
|
||||
def notify
|
||||
def notify(inbox)
|
||||
webpush_app = ::Rpush::App.find_by(name: "webpush")
|
||||
target_user.push_notification(webpush_app, inbox) if webpush_app
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue