4 const fetchFromBackend = async () => {
5 let contentType = null;
6 if (window.location.href.indexOf('/node/add') !== -1) {
7 contentType = window.location.href.split("/").pop();
10 let url = '/admin/permissions-by-term/access-info-by-url?url=' + window.location.pathname;
11 if (contentType !== null) {
12 url = '/admin/permissions-by-term/access-info-by-content-type/' + contentType;
15 return await fetch(url, { credentials:'include' })
16 .then(function(response) {
17 return response.json();
18 }).then(function(data) {
23 export default fetchFromBackend;