File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ <h2>Add a Comment</h2>
23
23
const topicName = window . location . pathname . split ( '/' ) . pop ( ) . replace ( '.html' , '' ) ; // Get topic name from URL
24
24
25
25
async function loadTopic ( ) {
26
- const response = await fetch ( `http://localhost:3000 /forum/${ topicName } ` ) ;
26
+ const response = await fetch ( `http://thejsurlback.onrender.com /forum/${ topicName } ` ) ;
27
27
const topic = await response . json ( ) ;
28
28
29
29
document . getElementById ( 'topic-title' ) . textContent = topic . title ;
@@ -43,7 +43,7 @@ <h2>Add a Comment</h2>
43
43
}
44
44
45
45
async function deleteComment ( replyIndex ) {
46
- const response = await fetch ( `http://localhost:3000 /forum/${ topicName } /reply/${ replyIndex } ` , {
46
+ const response = await fetch ( `http://thejsurlback.onrender.com /forum/${ topicName } /reply/${ replyIndex } ` , {
47
47
method : 'DELETE' ,
48
48
headers : {
49
49
'Authorization' : `Bearer admin` // Only admin can delete comments
You can’t perform that action at this time.
0 commit comments