REST API - determine if a message is a solution
I'm trying replicate the icons (board icon, solved icon) next to search results I'm pulling from the API. Here is the call to check if the message is solved. The response object, ResultMessage, is always undefined, even when I'm sending a message ID of a known solved message. Any tips?
$.ajax({
type: "GET",
url: "/${community.id}/restapi/vc/messages/id/" + msg.id.$ + "/solutions/solution",
success: function(resultMessage) {
console.log('got here 3');
console.log(resultMessage.response);
//if accepted solution, add accepted solution to the msgMarkup, if not, just output the result item
if (resultMessage.response.value == "true") {
msgMarkup += "<tr><td><a class='lia-link-navigation board-icon' id='link_1440ea2af6e_22049' href='#'><img title='Accepted Solution' alt='Accepted Solution' id='display_1440ea2af6e_22049' src='/skins/images/E72149B924F4ACBF01B4C71DAA3C95FC/base/images/message_type_solved.png'></a><a href='" + msg.view_href + "'>" + msg.subject.$ + "</a></td></tr>";
} else {
msgMarkup += "<tr><td><a class='lia-link-navigation board-icon' id='link_1440ea2af97_22049' href='#'><img title='Forum' alt='There are no unread messages in this message board' id='display_1440ea2af97_22049' src='/skins/images/7035348463CEC56F38BE4187FB05EB82/base/images/icon_board.png'></a><a href='" + msg.view_href + "'>" + msg.subject.$ + "</a></td></tr>";
}
}
//end Ajax
});