fix: rename data -> models

This commit is contained in:
Vasily Zubarev
2025-03-22 10:39:47 +01:00
parent ac8f848d94
commit 9ca7d9c712
50 changed files with 103 additions and 98 deletions

View File

@@ -1,6 +1,6 @@
import { getFileById } from "@/data/files"
import { resizeImage } from "@/lib/images"
import { pdfToImages } from "@/lib/pdf"
import { getFileById } from "@/models/files"
import fs from "fs/promises"
import { NextResponse } from "next/server"
import path from "path"
@@ -27,7 +27,7 @@ export async function GET(request: Request, { params }: { params: Promise<{ file
try {
await fs.access(file.path)
} catch {
return new NextResponse("File not found on disk", { status: 404 })
return new NextResponse(`File not found on disk: ${file.path}`, { status: 404 })
}
let previewPath = file.path