Implement feature for deleting posts and improving ajax requests
This commit is contained in:
@@ -18,7 +18,7 @@ function searchEntries() {
|
||||
if (!s_running && ((s_itemsLeft || val_changed) && (query.val().length > 0 || (type === 'type-users' && (rank !== '' || lang !== '' || country !== ''))))) {
|
||||
console.log(rank);
|
||||
$.ajax({
|
||||
url: 'http://192.168.178.39/posts/getSearchPosts',
|
||||
url: '/posts/getSearchPosts',
|
||||
data: {
|
||||
query: query.val(),
|
||||
type,
|
||||
@@ -160,7 +160,7 @@ $('.user-search select').change(() => {
|
||||
|
||||
function initUserSearch() {
|
||||
$.ajax({
|
||||
url: 'http://192.168.178.39/posts/getAvailableCountries',
|
||||
url: '/posts/getAvailableCountries',
|
||||
success: (data) => {
|
||||
const countrySelect = $('#searchForCountry').find('.dropdown-menu');
|
||||
console.log(data);
|
||||
@@ -184,7 +184,7 @@ function initUserSearch() {
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: 'http://192.168.178.39/posts/getAvailableLanguages',
|
||||
url: '/posts/getAvailableLanguages',
|
||||
success: (data) => {
|
||||
const langSelect = $('#searchForLang').find('.dropdown-menu');
|
||||
for (let lang of data.languages) {
|
||||
|
||||
Reference in New Issue
Block a user