feat(select-entries): add bearer
This commit is contained in:
parent
17a6eb9962
commit
0771a2750b
1 changed files with 15 additions and 9 deletions
|
@ -137,16 +137,22 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|||
return false;
|
||||
})
|
||||
$('.btn-save-selected').on('click', function(e){
|
||||
e.preventDefault()
|
||||
let content = Array()
|
||||
$.each( $('.selected'), function( key, value ) {
|
||||
content.push(value.getAttribute('data-tag'))
|
||||
});
|
||||
$.get({
|
||||
url: "?api/entries/21",
|
||||
data: JSON.stringify({ antispam: 1, bf_titre: $('#title').val(), bf_activite: content }),
|
||||
contentType: 'application/json'
|
||||
e.preventDefault()
|
||||
let content = Array()
|
||||
$.each( $('.selected'), function( key, value ) {
|
||||
content.push(value.getAttribute('data-tag'))
|
||||
});
|
||||
const settings = {
|
||||
async: true,
|
||||
crossDomain: true,
|
||||
url: '?api/entries/21',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: 'Bearer ScTSZnBTCw6SWnpThhAAodKh4brbwrnHwxn5jzIsOLxjk4SotxlFbrqnZnEEvVvb'
|
||||
},
|
||||
data: JSON.stringify({ bf_titre: $('#title').val(), bf_activite: content, id_typeannonce: 21 }),
|
||||
contentType: 'application/json'
|
||||
};
|
||||
return false;
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue