Open flob38 opened 2 years ago
After searching on Discourse API, it seems that no parameter can be posted for the "latest" request. Filter must be done somehow on Discourse admin.
Désolée, je continue en français. L'url qui sert à aller chercher les derniers sujets du forum est la suivante : https://forum.camptocamp.org/latest.json?exclude_category_ids[]=29&exclude_category_ids[]=40&exclude_category_ids[]=41&exclude_category_ids[]=42&exclude_category_ids[]=43&exclude_category_ids[]=44&exclude_category_ids[]=45&exclude_category_ids[]=47&exclude_category_ids[]=54&exclude_category_ids[]=55&exclude_category_ids[]=56&exclude_category_ids[]=64&exclude_category_ids[]=94&exclude_category_ids[]=95&exclude_category_ids[]=96&exclude_category_ids[]=97&exclude_category_ids[]=113&exclude_category_ids[]=136&exclude_category_ids[]=146 Elle donne les mêmes résultats que https://forum.camptocamp.org/latest.json Pourtant un filtre supplémentaire est bien appliqué puisqu'on ne voit pas le bistrot ni les forums avec accès réservé. Pour le comment du pourquoi je ne sais pas.
We have an outdated version of discourse, however I couldn't find the exclude_category_ids
param in the API? Did you find such thing @flob38?
@asaunier @cbeauchesne some hints?
We retrive topics with "latest" function. A piori, this function doesn't filter. https://docs.discourse.org/#tag/Topics/operation/listLatestTopics
I've found a post where the syntax of the exclude_category_ids was mentionning : https://meta.discourse.org/t/api-endpoint-for-latest-topics-in-public-categories/118305 Reponse : call the API with an account that can't see private categories. Maybe it's the way we call Discourse API ?
Describe the bug Some categories which are in EXCLUDED_CATEGORIES are not excluded. Example : 23/03/22 13h55
I found this because I'm working on a widget which would show only "not mountaineering" categories (Site and Association, contributeurs...), but whatever changes I've done on the constant EXCLUDED_CATEGORIES, it stay still.
Reproduce On local server, delete all categories in the constant EXCLUDED_CATEGORIES, this change nothing on the result.