mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 00:21:25 +08:00
DEV: Avoid duplicating constant between client and server (#25179)
Why this change? While the constant does not change very often, we should still avoid duplicating the value of a constant used on the server side in the client side to avoid the values going out of sync.
This commit is contained in:

committed by
GitHub

parent
22614ca85b
commit
c33a8d658b
@ -160,6 +160,8 @@ task "javascript:update_constants" => :environment do
|
||||
}
|
||||
|
||||
export const AUTO_GROUPS = #{auto_groups.to_json};
|
||||
|
||||
export const MAX_NOTIFICATIONS_LIMIT_PARAMS = #{NotificationsController::INDEX_LIMIT};
|
||||
JS
|
||||
|
||||
pretty_notifications = Notification.types.map { |n| " #{n[0]}: #{n[1]}," }.join("\n")
|
||||
|
Reference in New Issue
Block a user