fix: undefined
This commit is contained in:
parent
2c07d6719e
commit
d87e465a8e
1 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,8 @@ function postFileDecorator(fastify: FastifyInstance, _: unknown, done: () => voi
|
|||
done();
|
||||
|
||||
async function postFile(this: FastifyReply, file: Image) {
|
||||
if (!file) return true;
|
||||
|
||||
const nFile = await this.server.prisma.image.update({
|
||||
where: { id: file.id },
|
||||
data: { views: { increment: 1 } },
|
||||
|
|
Loading…
Add table
Reference in a new issue