Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 10

CurtisOdenLorenzoMaluchiTorbjornafiqasyraf93ericgillettetannerc +3 guests

discussion/add - DiscussionID not returned?

This discussion is related to the api (json) addon.
Hi,

the idea for me using this plugin is, to implement discussions into certain pages of my application that are stored and managed in Vanilla.

If a user creates a discussion on a certain page, I want to store the new DiscussionID as a relation in my app.

So I call the "discussion/add"-method of the API.
It works great. The discussion is created and I can see it in the Vanilla Forum. But the problme now is, that the response of the "discussion/add"-call does not return the new DiscussionID which would be essential for me.

Comments

  • Posts: 4
    Ok, I decided to have a look into the Addon-code myself and it figured out solving this was as easy as adding this to the Add-method of the class.discussioncontroller.php:

    $this->SetJSON("DiscussionID", $DiscussionID);

    Then the new discussion-id is also returned in the JSON-response.

    David
Sign In or Register to comment.