Skip to content

Commit

Permalink
Move endpoint to /api/player/autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
ddugovic committed Jul 13, 2024
1 parent d31cb81 commit 2091b99
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion public/javascripts/forum-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $(function () {
// We fall back to every site user after 3 letters of the username have been entered
// and there are no matches in the forum thread participants
$.ajax({
url: '/player/autocomplete',
url: '/api/player/autocomplete',
data: {
term: term,
},
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(function () {
if (name.length >= 3)
$.ajax({
method: 'GET',
url: '/player/autocomplete',
url: '/api/player/autocomplete',
data: {
term: name,
exists: 1,
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/team-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(() => {
// show loading animation and hide the suggestions dropdown
tagify.loading(true).dropdown.hide.call(tagify);

fetch(`/player/autocomplete?term=${encodeURIComponent(term)}&names=1`, {
fetch(`/api/player/autocomplete?term=${encodeURIComponent(term)}&names=1`, {
signal: abortCtrl.signal,
})
.then(r => r.json())
Expand Down
2 changes: 1 addition & 1 deletion ui/site/src/clas.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ $(function () {
if (term.length < 2) callback([]);
else
$.ajax({
url: '/player/autocomplete?object=1&teacher=1',
url: '/api/player/autocomplete?object=1&teacher=1',
data: {
term: term,
},
Expand Down
2 changes: 1 addition & 1 deletion ui/site/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
source: function (query, _, runAsync) {
if (query.trim().match(/^[a-z0-9][\w-]{2,29}$/i))
$.ajax({
url: '/player/autocomplete',
url: '/api/player/autocomplete',
cache: true,
data: {
term: query,
Expand Down

0 comments on commit 2091b99

Please sign in to comment.