Skip to content

Commit 170c428

Browse files
authored
Update sitemaplinks.html
1 parent 835ea88 commit 170c428

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Wiki/sitemaplinks.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,14 @@ <h2>Wiki Posts</h2>
212212
document.addEventListener('DOMContentLoaded', () => {
213213
const createWikiForm = document.getElementById('createWikiForm');
214214
const wikiList = document.getElementById('wikiList');
215-
const backendUrl = 'https://thejsurlback.onrender.com/api'; // Replace with your backend URL
215+
const backendUrl = 'https://api.jsonbin.io/v3/b/67c73db1e41b4d34e4a0bfb1/'; // Replace with your backend URL
216216

217217
// Retrieve username from localStorage (this is optional, users can view wikis when logged out)
218218
const username = localStorage.getItem('username');
219219

220220
// Fetch and display all wikis
221221
const fetchWikis = async () => {
222-
const response = await fetch(`${backendUrl}/wikis`);
222+
const response = await fetch(`${backendUrl}/latest`);
223223
const wikis = await response.json();
224224
wikiList.innerHTML = ''; // Clear the current list
225225

@@ -251,7 +251,7 @@ <h3>${wiki.title}</h3>
251251
const title = document.getElementById('wikiTitle').value;
252252
const content = document.getElementById('wikiContent').value;
253253

254-
const response = await fetch(`${backendUrl}/wikis`, {
254+
const response = await fetch(`${backendUrl}/latest`, {
255255
method: 'POST',
256256
headers: { 'Content-Type': 'application/json' },
257257
body: JSON.stringify({ title, content, owner: username }), // Send username from localStorage

0 commit comments

Comments
 (0)