diff --git a/pb_public/admin/manage.html b/pb_public/admin/manage.html index 5751898..9b35f75 100644 --- a/pb_public/admin/manage.html +++ b/pb_public/admin/manage.html @@ -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 @@ - - Preview + + Preview ${media.media} @@ -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",