Chg: loggerをclassに変更 / Feat: loggerでの発生場所の記録
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import { DatabaseError, ErrorBase, InputError } from "@/errors";
|
||||
import logger from "@/lib/logger";
|
||||
import Logger from "@/lib/logger";
|
||||
import { TokenEntity } from "@/modules/entities/Token";
|
||||
import { UserEntity } from "@/modules/entities/User";
|
||||
import { UserRepository } from "@/modules/repositories/User";
|
||||
import type { FastifyInstance } from "fastify";
|
||||
|
||||
export default function SignIn(fastify: FastifyInstance) {
|
||||
const logger = new Logger("Endpoint | primary/signin");
|
||||
|
||||
fastify.post("/", async (req, res) => {
|
||||
res.header("Content-Type", "application/json");
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { UserEntity } from "@/modules/entities/User";
|
||||
import logger from "@/lib/logger";
|
||||
import Logger from "@/lib/logger";
|
||||
import type { FastifyInstance } from "fastify";
|
||||
import { UserRepository } from "@/modules/repositories/User";
|
||||
import { DatabaseError, InputError } from "@/errors";
|
||||
|
||||
export default function SignUp(fastify: FastifyInstance) {
|
||||
const logger = new Logger("Endpoint | primary/signup");
|
||||
|
||||
fastify.post("/", async (req, res) => {
|
||||
res.header("Content-Type", "application/json");
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { DatabaseError } from "@/errors";
|
||||
import logger from "@/lib/logger";
|
||||
import Logger from "@/lib/logger";
|
||||
import { ConfigEntity } from "@/modules/entities/Config";
|
||||
import { UserEntity } from "@/modules/entities/User";
|
||||
import type { FastifyInstance } from "fastify";
|
||||
|
||||
export default async function ServerInfo(fastify: FastifyInstance) {
|
||||
const logger = new Logger("Endpoint | server-info");
|
||||
|
||||
fastify.post("/", async (req, res) => {
|
||||
try {
|
||||
const config = fastify.orm.em.getRepository(ConfigEntity);
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { UserEntity } from "@/modules/entities/User";
|
||||
import logger from "@/lib/logger";
|
||||
import Logger from "@/lib/logger";
|
||||
import type { FastifyInstance } from "fastify";
|
||||
import { UserRepository } from "@/modules/repositories/User";
|
||||
import { DatabaseError, ErrorBase, InputError } from "@/errors";
|
||||
|
||||
export default function CreateAdmin(fastify: FastifyInstance) {
|
||||
const logger = new Logger("Endpoint | setup/create-admin");
|
||||
|
||||
fastify.post("/", async (req, res) => {
|
||||
res.header("Content-Type", "application/json");
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { DatabaseError, ErrorBase, InputError } from "@/errors";
|
||||
import logger from "@/lib/logger";
|
||||
import Logger from "@/lib/logger";
|
||||
import { ConfigEntity } from "@/modules/entities/Config";
|
||||
import type { FastifyInstance } from "fastify";
|
||||
import z from "zod/v3";
|
||||
|
||||
export default function Initialization(fastify: FastifyInstance) {
|
||||
const logger = new Logger("Endpoint | setup/initialization");
|
||||
|
||||
fastify.post("/", async (req, res) => {
|
||||
res.header("Content-Type", "application/json");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user