logInfo => logError

This commit is contained in:
Darius
2026-02-07 21:16:15 +01:00
parent 9a9b99c84c
commit c7faa4fc0a

View File

@@ -1,5 +1,5 @@
import { WsService } from "@dpu/shared";
import { logInfo } from "@dpu/shared/dist/logger.js";
import { logError } from "@dpu/shared/dist/logger.js";
import fastifyCors from "@fastify/cors";
import fastifySwagger from "@fastify/swagger";
import fastifySwaggerUi from "@fastify/swagger-ui";
@@ -8,10 +8,10 @@ import type { FastifyReply, FastifyRequest } from "fastify";
import Fastify from "fastify";
import fastifyAxios from "fastify-axios";
import {
jsonSchemaTransform,
serializerCompiler,
validatorCompiler,
type ZodTypeProvider,
jsonSchemaTransform,
serializerCompiler,
validatorCompiler,
type ZodTypeProvider,
} from "fastify-type-provider-zod";
import { SwaggerTheme, SwaggerThemeNameEnum } from "swagger-themes";
import { z } from "zod";
@@ -117,7 +117,7 @@ async function verifyAPIKey(
const apiKey = request.headers["x-api-key"];
if (!apiKey || apiKey !== Config.api_key) {
logInfo("POST Request with wrong API key received");
logError("POST Request with wrong API key received");
return reply.code(401).send({ error: "Invalid API key" });
}
}