diff --git a/apps/web/app/app/[keyid]/files/page.tsx b/apps/web/app/app/[keyid]/files/page.tsx
index 192adb1b..4be71202 100644
--- a/apps/web/app/app/[keyid]/files/page.tsx
+++ b/apps/web/app/app/[keyid]/files/page.tsx
@@ -32,8 +32,8 @@ export default async function Media({
: 0;
totalPages === 0 ? (totalPages = 1) : totalPages;
- } catch (error) {
- return
Something went wrong
;
+ } catch (error: any) {
+ return Something went wrong: {error.message}
;
}
return (
diff --git a/apps/web/lib/media-handlers.ts b/apps/web/lib/media-handlers.ts
index 0825f712..42761bab 100644
--- a/apps/web/lib/media-handlers.ts
+++ b/apps/web/lib/media-handlers.ts
@@ -1,5 +1,4 @@
import { Media } from "@medialit/models";
-import mongoose from "mongoose";
const medialitServer = process.env.API_SERVER || "https://api.medialit.cloud";
@@ -40,7 +39,7 @@ export async function getPaginatedMedia({
},
body: JSON.stringify({
apikey,
- internalApikey,
+ internalKey: internalApikey,
}),
credentials: "same-origin",
}
@@ -70,7 +69,7 @@ export async function getMedia({
},
body: JSON.stringify({
apikey,
- internalApikey,
+ internalKey: internalApikey,
}),
});
response = await response.json();
@@ -91,7 +90,7 @@ export async function getMediaCount({
},
body: JSON.stringify({
apikey,
- internalApikey,
+ internalKey: internalApikey,
}),
});
response = await response.json();
@@ -112,7 +111,7 @@ export async function getMediaTotalSize({
},
body: JSON.stringify({
apikey,
- internalApikey,
+ internalKey: internalApikey,
}),
});
response = await response.json();
@@ -137,7 +136,7 @@ export async function getPresignedUrlForUpload({
},
body: JSON.stringify({
apikey,
- internalApikey,
+ internalKey: internalApikey,
group,
}),
}
@@ -169,7 +168,7 @@ export async function deleteMedia({
},
body: JSON.stringify({
apikey,
- internalApikey,
+ internalKey: internalApikey,
}),
}
);