Files
shields/services
Joshua NewtonandGitHub f6e40a600e [Discourse] Update schema keys to use plural form (topic_count -> topics_count) (#9778)
* Discourse: Update schema to use plural keys

(e.g. topic_count -> topics_countN)

* Revert "Discourse: Update schema to use plural keys"

This reverts commit 4073a17aaa.

* `discourse.service.js`: Add `Joi.alternatives` plural schema

* `discourse.service.js`: Update func to be plural-agnostic

Previously, for e.g. 'topic', the call to the `DiscourseMetricIntegrationFactory` function supplied both 'topics' and 'topic_count'. And, we now need to check for 'topics_count' as well. To cover all three string variations, why not supply only 'topic' to the function, then selectively add the 's' on a case-by-case basis.

((Note: I've preserved the old metricName variable as to minimize the diff here and make my changes clearer.))

* `discourse.tester.js`: Add second `data` case

* Address Prettier linting warnings
2023-12-06 19:54:39 +00:00
..
2023-09-11 23:08:23 +00:00
2023-09-10 11:41:23 +00:00
2023-10-16 18:45:09 +00:00
2023-10-13 15:40:57 +00:00
2023-11-19 19:24:56 +00:00
2023-12-06 18:42:06 +00:00
2023-07-03 16:59:04 +00:00
2023-10-13 15:40:57 +00:00
2023-08-23 19:51:18 +00:00