Use auth'ed admin chat messages endpoint to get history

This commit is contained in:
Gabe Kangas
2020-12-26 17:36:46 -08:00
parent 71b91a7fe0
commit 5345c124aa
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ export default function Chat() {
const getInfo = async () => { const getInfo = async () => {
try { try {
const result = await fetchData(CHAT_HISTORY, { auth: false }); const result = await fetchData(CHAT_HISTORY, { auth: true });
setMessages(result); setMessages(result);
} catch (error) { } catch (error) {
console.log("==== error", error); console.log("==== error", error);

View File

@ -35,7 +35,7 @@ export const LOGS_ALL = `${API_LOCATION}logs`;
export const LOGS_WARN = `${API_LOCATION}logs/warnings`; export const LOGS_WARN = `${API_LOCATION}logs/warnings`;
// Get chat history // Get chat history
export const CHAT_HISTORY = `${NEXT_PUBLIC_API_HOST}api/chat`; export const CHAT_HISTORY = `${API_LOCATION}chat/messages`;
// Get chat history // Get chat history
export const UPDATE_CHAT_MESSGAE_VIZ = `${NEXT_PUBLIC_API_HOST}api/admin/chat/updatemessagevisibility`; export const UPDATE_CHAT_MESSGAE_VIZ = `${NEXT_PUBLIC_API_HOST}api/admin/chat/updatemessagevisibility`;