Replaced console.log calls with custom logger ones

This commit is contained in:
2023-06-27 19:03:38 +02:00
parent 578b21d4b5
commit 9ab12118a0
6 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
import { Request, Response } from 'express';
import { prisma, __path } from '../../index.js';
import { prisma, __path, log } from '../../index.js';
async function get(req: Request, res: Response) {
// If no page is provided redirect to first
@ -32,7 +32,7 @@ async function get(req: Request, res: Response) {
});
})
.catch((err) => {
console.error(err);
log.db.error(err);
res.status(500).render(__path + '/src/frontend/errors/dbError.eta.html', { error: err });
});
}