diff --git a/docs/schema/create_tables.sql b/docs/schema/create_tables.sql index df0af70..ae5d74a 100644 --- a/docs/schema/create_tables.sql +++ b/docs/schema/create_tables.sql @@ -91,6 +91,8 @@ CREATE TABLE IF NOT EXISTS snp_service_api ( api_path VARCHAR(500) NOT NULL, api_method VARCHAR(10) NOT NULL, api_name VARCHAR(200) NOT NULL, + api_domain VARCHAR(100), + api_section VARCHAR(100), description TEXT, is_active BOOLEAN NOT NULL DEFAULT TRUE, created_at TIMESTAMP NOT NULL DEFAULT NOW(), diff --git a/frontend/src/pages/admin/ServicesPage.tsx b/frontend/src/pages/admin/ServicesPage.tsx index 2f2f1bd..d1a21bc 100644 --- a/frontend/src/pages/admin/ServicesPage.tsx +++ b/frontend/src/pages/admin/ServicesPage.tsx @@ -61,6 +61,8 @@ const ServicesPage = () => { const [apiMethod, setApiMethod] = useState('GET'); const [apiPath, setApiPath] = useState(''); const [apiName, setApiName] = useState(''); + const [apiDomain, setApiDomain] = useState(''); + const [apiSection, setApiSection] = useState(''); const [apiDescription, setApiDescription] = useState(''); const fetchServices = async () => { @@ -174,6 +176,8 @@ const ServicesPage = () => { setApiMethod('GET'); setApiPath(''); setApiName(''); + setApiDomain(''); + setApiSection(''); setApiDescription(''); setIsApiModalOpen(true); }; @@ -193,6 +197,8 @@ const ServicesPage = () => { apiMethod, apiPath, apiName, + apiDomain: apiDomain || undefined, + apiSection: apiSection || undefined, description: apiDescription || undefined, }; const res = await createServiceApi(selectedService.serviceId, req); @@ -537,6 +543,28 @@ const ServicesPage = () => { className="w-full border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none" /> +
+
+ + setApiDomain(e.target.value)} + placeholder="예: Compliance" + className="w-full border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none" + /> +
+
+ + setApiSection(e.target.value)} + placeholder="예: 선박 규정" + className="w-full border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 rounded-lg px-3 py-2 focus:ring-2 focus:ring-blue-500 focus:outline-none" + /> +
+