Created
December 13, 2018 18:08
-
-
Save kkworden/fc74e5d8b1b816d2eb55ebfd747ea265 to your computer and use it in GitHub Desktop.
Fixes the chatroom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getChatroom() { | |
$.post('/api', { query: '{ messages }' }, function(data) { | |
var str = ''; | |
for (var message of data.data.messages) { | |
str += `${message}<br />`; | |
} | |
$('#messages').html(str); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment