fix (backend): fix order of logger initialization

This commit is contained in:
naskya 2024-04-25 08:15:40 +09:00
parent a2316b7caf
commit 7441f0861a
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -42,9 +42,9 @@ const router = new Router();
//#region Routing
function inbox(ctx: Router.RouterContext) {
const inboxLogger = serverLogger.createSubLogger("inbox");
function inbox(ctx: Router.RouterContext) {
if (ctx.req.headers.host !== config.host) {
inboxLogger.warn(`regecting invalid host (${ctx.req.headers.host})`);
ctx.status = 400;