Skip to content

Commit

Permalink
Add search for user #11
Browse files Browse the repository at this point in the history
  • Loading branch information
Scobiform committed Apr 19, 2024
1 parent 1204197 commit 1a38ccf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@

function performSearch() {
const query = document.getElementById('searchUser').value;
fetch(`${baseUrl}/search?query=${encodeURIComponent(query)}&instance=${encodeURIComponent('{{ user.url }}')}`)
const userInstance = '{{ user.url }}';
fetch(`${baseUrl}/search?query=${encodeURIComponent(query)}&instance=${encodeURIComponent(userInstance)}`)
.then(response => {
if (!response.ok) {
throw new Error('Failed to fetch data from the server');
Expand Down

0 comments on commit 1a38ccf

Please sign in to comment.