import { FastifyInstanceType } from "../../utils/types";
import { login } from "./controller";
import { loginResponseSchema, loginSchema } from "./schema";

export async function adminAuthRoutes(fastify: FastifyInstanceType) {
  //-------------------------------------------------------------------------------
  fastify.post(
    "login/",
    {
      schema: {
        body: loginSchema,
        response: {
          201: loginResponseSchema,
        },
      },
    },
    login
  );
  //-------------------------------------------------------------------------------
  fastify.log.info("auth routes registered");
}
