From adf1ce48f61632dfdc4b554e91cfce71923272d1 Mon Sep 17 00:00:00 2001 From: Daniel <nieltansah@gmail.com> Date: Fri, 24 Nov 2017 03:22:22 +0700 Subject: [PATCH] WebApp: Add ability to get prev. chat history --- TugasBesar2_2017/WebApp/src/main/webapp/js/converse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TugasBesar2_2017/WebApp/src/main/webapp/js/converse.js b/TugasBesar2_2017/WebApp/src/main/webapp/js/converse.js index eee6237..71a6279 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.') -- GitLab