Skip to content

Commit

Permalink
Update MessageList.js
Browse files Browse the repository at this point in the history
  • Loading branch information
verovaleros authored Sep 29, 2024
1 parent bf82118 commit 8be5662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/MessageList.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const MessageList = () => {
useEffect(() => {
const fetchMessages = async () => {
try {
const response = await axios.get('/api/messages');
const response = await axios.get(`${window.location.origin}/api/messages.json`);
setMessages(response.data);
} catch (err) {
setError('Failed to fetch messages.');
Expand Down

0 comments on commit 8be5662

Please sign in to comment.