260324_01_ENH: 로그인 response types/auth로 이동

This commit is contained in:
2026-03-24 15:32:02 +09:00
parent b2cf1b846f
commit 836f756a42
4 changed files with 8 additions and 8 deletions

View File

@@ -1,14 +1,9 @@
import {createBackApi} from "@/lib/server-api";
import {LoginRequest, LoginUser} from "@/types/auth";
import {LoginRequest, LoginResponse, LoginUser} from "@/types/auth";
import {NextRequest, NextResponse} from "next/server";
import {serverEnv} from "@/lib/env.server";
import {errorToResponse} from "@/lib/http-util";
type LoginResponse = {
accessToken: string;
user: LoginUser;
};
export const POST = async (req: NextRequest) => {
try {
const backApi = await createBackApi();

View File

@@ -1,4 +1,4 @@
import type {ProductResponse, StatisticsRequest} from "@/types/lg";
import type {StatisticsRequest} from "@/types/lg";
const sortRecord = <T,>(obj?: Record<string, T> | null): Record<string, T> => {
if (!obj) return {};

View File

@@ -3,6 +3,11 @@ export type LoginRequest = {
userPw: string;
};
export type LoginResponse = {
accessToken: string;
user: LoginUser;
};
export type LoginUser = {
userId: string;
userName: string;