We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c70a776 commit 77896b6Copy full SHA for 77896b6
1 file changed
apps/web/app/api/media/presigned/route.ts
@@ -8,11 +8,6 @@ import { auth } from "@/auth";
8
import { error } from "@/services/logger";
9
import { MediaLit } from "medialit";
10
11
-const medialit = new MediaLit({
12
- apiKey: process.env.MEDIALIT_APIKEY,
13
- endpoint: process.env.MEDIALIT_SERVER,
14
-});
15
-
16
export async function POST(req: NextRequest) {
17
const domain = await DomainModel.findOne<Domain>({
18
name: req.headers.get("domain"),
@@ -45,6 +40,11 @@ export async function POST(req: NextRequest) {
45
40
);
46
41
}
47
42
43
+ const medialit = new MediaLit({
44
+ apiKey: process.env.MEDIALIT_APIKEY,
+ endpoint: process.env.MEDIALIT_SERVER,
+ });
+
48
try {
49
let signature = await medialit.getSignature({
50
group: domain.name,
0 commit comments