fix url
This commit is contained in:
@ -86,7 +86,7 @@
|
||||
|
||||
// fetch mediaData from http://127.0.0.1:8090/api/collections/media/records/ with GET method
|
||||
function fetchMediaData() {
|
||||
fetch("http://127.0.0.1:8090/api/collections/media/records/", {
|
||||
fetch("/api/collections/media/records/", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@ -118,8 +118,8 @@
|
||||
<input type="checkbox" id="${media.id}">
|
||||
</td>
|
||||
<td>
|
||||
<a href="http://127.0.0.1:8090/api/files/${media.collectionId}/${media.id}/${media.media}">
|
||||
<img src="http://127.0.0.1:8090/api/files/${media.collectionId}/${media.id}/${media.media}?thumb=100x100" alt="Preview" style="width: 100px; height: 100px;">
|
||||
<a href="/api/files/${media.collectionId}/${media.id}/${media.media}">
|
||||
<img src="/api/files/${media.collectionId}/${media.id}/${media.media}?thumb=100x100" alt="Preview" style="width: 100px; height: 100px;">
|
||||
</a>
|
||||
</td>
|
||||
<td>${media.media}</td>
|
||||
@ -142,7 +142,7 @@
|
||||
// After successful deletion, update the mediaData array and refresh the media list
|
||||
// delete media from http://127.0.0.1:8090/api/collections/media/records/{id} with DELETE method
|
||||
// check for response 204 and remove media from mediaData array
|
||||
fetch(`http://127.0.0.1:8090/api/collections/media/records/`+ mediaId, {
|
||||
fetch(`/api/collections/media/records/`+ mediaId, {
|
||||
method: "DELETE",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@ -170,7 +170,7 @@
|
||||
// find the input with the id of index
|
||||
let durationInput = Array.from(durationInputs).find(input => input.id === index.toString());
|
||||
// PATCH request to update the duration of the media file /api/collections/media/records/:id
|
||||
fetch(`http://127.0.0.1:8090/api/collections/media/records/`+ index, {
|
||||
fetch(`/api/collections/media/records/`+ index, {
|
||||
method: "PATCH",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
Reference in New Issue
Block a user