fix(api): data not defined
This commit is contained in:
parent
42d77e445b
commit
4d9a22e82c
1 changed files with 3 additions and 0 deletions
|
@ -91,6 +91,9 @@ async function run() {
|
|||
res.end(data);
|
||||
}
|
||||
} else if (req.url.startsWith(config.uploader.route)) {
|
||||
const data = await getFile(config.uploader.directory, parts[2]);
|
||||
if (!data) return app.render404(req, res);
|
||||
|
||||
let image = await prisma.image.findFirst({
|
||||
where: {
|
||||
OR: [
|
||||
|
|
Loading…
Reference in a new issue