Skip to content

Commit

Permalink
Merge pull request #100 from codelitdev/bad-endpoint
Browse files Browse the repository at this point in the history
Fixed bad endpoint
  • Loading branch information
rajat1saxena authored Feb 19, 2024
2 parents 05152af + 82a097d commit 3c3bf69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions apps/web/app/app/[keyid]/files/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default async function Media({
: 0;

totalPages === 0 ? (totalPages = 1) : totalPages;
} catch (error) {
return <div>Something went wrong</div>;
} catch (error: any) {
return <div>Something went wrong: {error.message}</div>;
}

return (
Expand Down
13 changes: 6 additions & 7 deletions apps/web/lib/media-handlers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Media } from "@medialit/models";
import mongoose from "mongoose";

const medialitServer = process.env.API_SERVER || "https://api.medialit.cloud";

Expand Down Expand Up @@ -40,7 +39,7 @@ export async function getPaginatedMedia({
},
body: JSON.stringify({
apikey,
internalApikey,
internalKey: internalApikey,
}),
credentials: "same-origin",
}
Expand Down Expand Up @@ -70,7 +69,7 @@ export async function getMedia({
},
body: JSON.stringify({
apikey,
internalApikey,
internalKey: internalApikey,
}),
});
response = await response.json();
Expand All @@ -91,7 +90,7 @@ export async function getMediaCount({
},
body: JSON.stringify({
apikey,
internalApikey,
internalKey: internalApikey,
}),
});
response = await response.json();
Expand All @@ -112,7 +111,7 @@ export async function getMediaTotalSize({
},
body: JSON.stringify({
apikey,
internalApikey,
internalKey: internalApikey,
}),
});
response = await response.json();
Expand All @@ -137,7 +136,7 @@ export async function getPresignedUrlForUpload({
},
body: JSON.stringify({
apikey,
internalApikey,
internalKey: internalApikey,
group,
}),
}
Expand Down Expand Up @@ -169,7 +168,7 @@ export async function deleteMedia({
},
body: JSON.stringify({
apikey,
internalApikey,
internalKey: internalApikey,
}),
}
);
Expand Down

0 comments on commit 3c3bf69

Please sign in to comment.