mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-13 20:15:35 +01:00
fix build error
This commit is contained in:
@@ -3,16 +3,16 @@ import { mimeForStoredFile } from "@rahoot/web/server/media"
|
|||||||
import fs from "fs"
|
import fs from "fs"
|
||||||
import { promises as fsp } from "fs"
|
import { promises as fsp } from "fs"
|
||||||
import path from "path"
|
import path from "path"
|
||||||
import { NextResponse } from "next/server"
|
import { NextRequest, NextResponse } from "next/server"
|
||||||
|
|
||||||
export const runtime = "nodejs"
|
export const runtime = "nodejs"
|
||||||
export const dynamic = "force-dynamic"
|
export const dynamic = "force-dynamic"
|
||||||
|
|
||||||
type Params = {
|
export async function GET(
|
||||||
params: { file: string }
|
_request: NextRequest,
|
||||||
}
|
context: { params: Promise<{ file: string }> },
|
||||||
|
) {
|
||||||
export async function GET(_request: Request, { params }: Params) {
|
const params = await context.params
|
||||||
const safeName = path.basename(params.file)
|
const safeName = path.basename(params.file)
|
||||||
|
|
||||||
if (safeName !== params.file) {
|
if (safeName !== params.file) {
|
||||||
|
|||||||
Reference in New Issue
Block a user