Skip to content

Commit

Permalink
fix(edit-content): Inconsistency displaying binary versions #27390 (#…
Browse files Browse the repository at this point in the history
…27394)

* dev: get working contentlet in

* clean up
  • Loading branch information
rjvelazco committed Jan 23, 2024
1 parent 7f2cd05 commit 1894351
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -750,14 +750,14 @@
* This is a workaround to get the contentlet from the API
* because there is no way to get the same contentlet the AP retreive from the dwr call.
*/
fetch('/api/content/id/<%=contentlet.getIdentifier()%>', {
fetch('/api/v1/content/<%=contentlet.getInode()%>', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}).then(response => response.json())
.then(({ contentlets }) => {
const contentlet = contentlets[0];
})
.then(response => response.json())
.then(({ entity: contentlet }) => {
const field = document.querySelector('#binary-field-input-<%=field.getFieldContentlet()%>ValueField');
const variable = "<%=field.getVelocityVarName()%>";
const fielData = {
Expand Down

0 comments on commit 1894351

Please sign in to comment.