251201_01_ENH : datatable, autocomplete, user관리 완성

This commit is contained in:
2025-12-02 13:45:35 +09:00
parent 74de3d58f7
commit 310506d9ef
45 changed files with 5313 additions and 368 deletions

View File

@@ -0,0 +1,22 @@
import {NextRequest, NextResponse} from "next/server";
import {createContactApi} from "@/lib/server-api";
import {RoleInfo} from "@/types/role";
import {errorToResponse} from "@/lib/http-util";
import {RouteContext} from "@/types/common";
export const GET = async (req: NextRequest, context: RouteContext) => {
try {
const { slug = [] } = await context.params;
const [action] = slug;
const contactApi = await createContactApi();
if (!action) {
const result = await contactApi.get<RoleInfo[]>("/role");
return NextResponse.json(result, { status: 200 });
}
return NextResponse.json({ message: "Not found" }, { status: 404 });
} catch (error: unknown) {
return errorToResponse(error);
}
};