mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-15 01:01:20 +10:00
Logging (#131)
* ci: pull version from package.json on build * fix: implicit any type * feat: inital support for logger * style: fix lint * feat: move more logging over to pino * fix: logging around company importing
This commit is contained in:
@ -7,6 +7,7 @@ import authManager, {
|
||||
checkHashArgon2,
|
||||
checkHashBcrypt,
|
||||
} from "~/server/internal/auth";
|
||||
import { logger } from "~/server/internal/logging";
|
||||
|
||||
const signinValidator = type({
|
||||
username: "string",
|
||||
@ -28,7 +29,7 @@ export default defineEventHandler<{
|
||||
const body = signinValidator(await readBody(h3));
|
||||
if (body instanceof type.errors) {
|
||||
// hover out.summary to see validation errors
|
||||
console.error(body.summary);
|
||||
logger.error(body.summary);
|
||||
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
|
||||
Reference in New Issue
Block a user