Skip to content

A platform for community discussion. Free, open, simple.

DEV: Approved Post Webhook Event Category Update (#28725)

Guhyoun Nam93564bfa7d17
diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb
index b1492d96f47..3b003e1f2da 100644
--- a/app/models/web_hook.rb
+++ b/app/models/web_hook.rb
@@ -40,6 +40,7 @@ class WebHook < ActiveRecord::Base
WebHookEventType::TYPES[:post_edited],
WebHookEventType::TYPES[:post_destroyed],
WebHookEventType::TYPES[:post_recovered],
+ WebHookEventType::TYPES[:category_experts_approved],
],
)
end
diff --git a/app/models/web_hook_event_type.rb b/app/models/web_hook_event_type.rb
index e6b5043888d..a5a66120598 100644
--- a/app/models/web_hook_event_type.rb
+++ b/app/models/web_hook_event_type.rb
@@ -17,7 +17,6 @@ class WebHookEventType < ActiveRecord::Base
USER_PROMOTED = 16
TOPIC_VOTING = 17
CHAT_MESSAGE = 18
- CATEGORY_EXPERTS = 19
enum group: {
topic: 0,
@@ -36,7 +35,6 @@ class WebHookEventType < ActiveRecord::Base
user_promoted: 13,
voting: 14,
chat: 15,
- category_experts: 16,
},
_scopes: false
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 2ebd9628ffd..fcb822288ba 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -5409,6 +5409,7 @@ en:
post_edited: "Post is updated"
post_destroyed: "Post is deleted"
post_recovered: "Post is recovered"
+ category_experts_approved: "Post is approved by category experts"
group_event:
group_name: "Group Events"
group_created: "Group is created"
diff --git a/db/fixtures/007_web_hook_event_types.rb b/db/fixtures/007_web_hook_event_types.rb
index 874c8f74ead..61f6807a0d5 100644
--- a/db/fixtures/007_web_hook_event_types.rb
+++ b/db/fixtures/007_web_hook_event_types.rb
@@ -233,5 +233,5 @@ end
WebHookEventType.seed do |b|
b.id = WebHookEventType::TYPES[:category_experts_approved]
b.name = "category_experts_approved"
- b.group = WebHookEventType.groups[:category_experts]
+ b.group = WebHookEventType.groups[:post]
end