Closed
Description
The challenge object will now have a discussions node. The logic on the frontend should be:
- If the challenge object has a discussions object, loop through it and look for
type
:challenge
. - If it has
type
:challenge
, build a link for the<a href="{url}">{name}</a>
- If there is no discussions node, if there is no type challenge, or if the type challenge has no url, default back to looking for the
legacy.forumId
that you do now.
Note, it is valid to have multiple type challenge nodes, so the frontend code should list them in a <ul>
type list. Order of the array is fine, you don't need to sort them alphabetically or anything.
Example Challenge Object
{
...
"discussions": [
{
"name": "Challenge Discussions",
"type": "challenge",
"provider": "vanilla",
"url": "https://vanilla.topcoder-dev.com/forum/group/discussionid",
"options": [{ "key": "foo", "value": "bar" }]
}
]
}
The options
array has nothing currently on the challenge forum. That's for future-proofing if we need to do registration for slack, or some other setup for other providers. Ignore that for now for Vanilla challenge forums.
Reference Issue:
topcoder-platform/challenge-api#290