Archived
1
0

Implement feature for deleting posts and improving ajax requests

This commit is contained in:
Marcel
2018-10-17 13:56:22 +02:00
parent b32b2790c8
commit 334aa22362
23 changed files with 193 additions and 96 deletions

View File

@@ -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) {