diff --git a/TugasBesar2_2017/WebApp/src/main/webapp/js/converse.js b/TugasBesar2_2017/WebApp/src/main/webapp/js/converse.js index eee6237eb2fa4169103aba95aa61bdc279070988..71a6279538cd63867733cfeae032481ad60b836d 100644 --- a/TugasBesar2_2017/WebApp/src/main/webapp/js/converse.js +++ b/TugasBesar2_2017/WebApp/src/main/webapp/js/converse.js @@ -41,8 +41,8 @@ let converse = function ($http) { 'token': await messaging.getToken() }) - console.log(data) - await $http.post(`${apiUrl}/driver/${this.id}/chat/init`, data) + let response = await $http.post(`${apiUrl}/driver/${this.id}/chat/init`, data) + return response.chats } catch (e) { console.log(e) alert('Unable to initialize chat service.')