diff --git a/client/src/components/Forums/ThreadsDisplay/ThreadsDisplay.tsx b/client/src/components/Forums/ThreadsDisplay/ThreadsDisplay.tsx index 8fd6810..1740bc3 100644 --- a/client/src/components/Forums/ThreadsDisplay/ThreadsDisplay.tsx +++ b/client/src/components/Forums/ThreadsDisplay/ThreadsDisplay.tsx @@ -65,13 +65,13 @@ const ThreadsDisplay = ({ forumId, onThreadSelect }: ThreadsDisplayProps) => { const handleUpdateThread = async ( event: React.MouseEvent, threadId: string, + forum: string, ) => { event.stopPropagation(); setLoading(true); try { - console.log('handleUpdateThread HIT: '); await axios.put( - `/api/forums/${forumId}/threads/${threadId}`, + `/api/forums/${forumId || forum}/threads/${threadId}`, { title: editTitle, content: editContent }, { withCredentials: true }, ); @@ -134,7 +134,7 @@ const ThreadsDisplay = ({ forumId, onThreadSelect }: ThreadsDisplayProps) => { className="w-full p-2 mb-2 rounded bg-gray-800 text-white" />