From 5345c124aae664b0a6e3ba9503ffe706bedaf3cd Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sat, 26 Dec 2020 17:36:46 -0800 Subject: [PATCH] Use auth'ed admin chat messages endpoint to get history --- web/pages/chat.tsx | 2 +- web/utils/apis.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pages/chat.tsx b/web/pages/chat.tsx index 4bcaff6f9..992e7e59e 100644 --- a/web/pages/chat.tsx +++ b/web/pages/chat.tsx @@ -48,7 +48,7 @@ export default function Chat() { const getInfo = async () => { try { - const result = await fetchData(CHAT_HISTORY, { auth: false }); + const result = await fetchData(CHAT_HISTORY, { auth: true }); setMessages(result); } catch (error) { console.log("==== error", error); diff --git a/web/utils/apis.ts b/web/utils/apis.ts index 062785555..5e1be34ad 100644 --- a/web/utils/apis.ts +++ b/web/utils/apis.ts @@ -35,7 +35,7 @@ export const LOGS_ALL = `${API_LOCATION}logs`; export const LOGS_WARN = `${API_LOCATION}logs/warnings`; // Get chat history -export const CHAT_HISTORY = `${NEXT_PUBLIC_API_HOST}api/chat`; +export const CHAT_HISTORY = `${API_LOCATION}chat/messages`; // Get chat history export const UPDATE_CHAT_MESSGAE_VIZ = `${NEXT_PUBLIC_API_HOST}api/admin/chat/updatemessagevisibility`;