Message from JavaScript discussions
October 2017
— Or change "results" in your response to "data"
$(document).ready(function () {
$('#table_channel').DataTable({
"processing": true,
"serverSide": true,
"ajax": {
"url": 'http://localhost:8401/administrator/channel/',
"headers": {
'Authorization': 'JWT ' + window.localStorage.getItem("adapay_secret_token")
},
"type": "GET",
"dataType": 'json'
},
"columns": [
{"results": "channel_code"},
{"results": "channel_name"},
{"results": "channel_phone"},
{"results": "channel_email"},
{"results": "channel_email"}
]
});
});
— This is how its looks like now
— And same error, TypeError: data is undefined
☹️
— Maybe change all "results" to "data"?
— Same error data is undefined
— Yeah, already full refresh the browser too
— Ngrok it
— I'm at a computer now
— The client or api?
— Both?
— Make it work for me