mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-07-05 13:22:11 +00:00
Add accept and unaccept solution events
This commit is contained in:
parent
d7b9e47231
commit
1c7a4e4178
@ -53,6 +53,8 @@ after_initialize do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
DiscourseEvent.trigger(:accepted_solution, post)
|
||||||
|
|
||||||
render json: success_json
|
render json: success_json
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -79,6 +81,8 @@ after_initialize do
|
|||||||
|
|
||||||
notification.destroy if notification
|
notification.destroy if notification
|
||||||
|
|
||||||
|
DiscourseEvent.trigger(:unaccepted_solution, post)
|
||||||
|
|
||||||
render json: success_json
|
render json: success_json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user