From 811a04347fa2d8dd8b703fc4fb01223d0df355b9 Mon Sep 17 00:00:00 2001 From: hskwon Date: Mon, 22 Dec 2025 19:51:36 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=94=8C=EB=A1=9C=EC=9A=B0=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=84=B0=20=EA=B0=9C=EC=84=A0=20=EB=B0=8F=20=ED=92=88?= =?UTF-8?q?=EB=AA=A9=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - LoginToken 모델 수정 - items-bom/crud/search 플로우 데이터 업데이트 - API_FLOW_TESTER_DESIGN 문서 업데이트 - example-flows 뷰 업데이트 --- app/Models/LoginToken.php | 7 +++++-- database/data/flow-tester/items-bom.json | 2 +- database/data/flow-tester/items-crud.json | 2 +- database/data/flow-tester/items-search.json | 2 +- docs/API_FLOW_TESTER_DESIGN.md | 6 +++--- .../flow-tester/partials/example-flows.blade.php | 10 +++++----- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/Models/LoginToken.php b/app/Models/LoginToken.php index 6c9f36b4..23a146a1 100644 --- a/app/Models/LoginToken.php +++ b/app/Models/LoginToken.php @@ -51,11 +51,14 @@ public static function createForUser(int $userId): self /** * DEV 사이트 자동 로그인 URL 생성 + * 현재 도메인에서 'mng'를 'dev'로 변경하여 동적 생성 */ public function getAutoLoginUrl(): string { - $devAppUrl = config('services.dev.app_url', 'https://dev.sam.kr'); + $currentHost = request()->getHost(); // mng.sam.kr 또는 mng.codebridge-x.com + $devHost = str_replace('mng.', 'dev.', $currentHost); + $scheme = request()->getScheme(); // http 또는 https - return "{$devAppUrl}/auto-login?token={$this->token}"; + return "{$scheme}://{$devHost}/auto-login?token={$this->token}"; } } diff --git a/database/data/flow-tester/items-bom.json b/database/data/flow-tester/items-bom.json index 51413f01..b948e372 100644 --- a/database/data/flow-tester/items-bom.json +++ b/database/data/flow-tester/items-bom.json @@ -6,7 +6,7 @@ "tags": ["items", "bom"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false }, diff --git a/database/data/flow-tester/items-crud.json b/database/data/flow-tester/items-crud.json index b7988953..717bf033 100644 --- a/database/data/flow-tester/items-crud.json +++ b/database/data/flow-tester/items-crud.json @@ -6,7 +6,7 @@ "tags": ["items", "crud", "faker"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false, "headers": { diff --git a/database/data/flow-tester/items-search.json b/database/data/flow-tester/items-search.json index 4b8959bb..7042ae63 100644 --- a/database/data/flow-tester/items-search.json +++ b/database/data/flow-tester/items-search.json @@ -6,7 +6,7 @@ "tags": ["items", "search", "stats"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false }, diff --git a/docs/API_FLOW_TESTER_DESIGN.md b/docs/API_FLOW_TESTER_DESIGN.md index 9e3a18e3..7b84f37d 100644 --- a/docs/API_FLOW_TESTER_DESIGN.md +++ b/docs/API_FLOW_TESTER_DESIGN.md @@ -63,7 +63,7 @@ ### 2.1 전체 구조 ▼ ┌─────────────────────────────────────────────────────────────────┐ │ External API Server │ -│ (SAM API: sam.kr/api/v1) │ +│ (SAM API: api.sam.kr/api/v1) │ └─────────────────────────────────────────────────────────────────┘ ``` @@ -157,7 +157,7 @@ ### 4.1 플로우 정의 구조 "tags": ["item-master", "integration-test"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": true, "headers": { @@ -712,7 +712,7 @@ ### 7.2 플로우 편집기 │ │ 1 { │ │ │ │ 2 "version": "1.0", │ │ │ │ 3 "config": { │ │ -│ │ 4 "baseUrl": "https://sam.kr/api/v1", │ │ +│ │ 4 "baseUrl": "https://api.sam.kr/api/v1", │ │ │ │ 5 "timeout": 30000 │ │ │ │ 6 }, │ │ │ │ 7 "steps": [ │ │ diff --git a/resources/views/dev-tools/flow-tester/partials/example-flows.blade.php b/resources/views/dev-tools/flow-tester/partials/example-flows.blade.php index c45150b8..e8f57a12 100644 --- a/resources/views/dev-tools/flow-tester/partials/example-flows.blade.php +++ b/resources/views/dev-tools/flow-tester/partials/example-flows.blade.php @@ -190,7 +190,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition- "tags": ["item-master", "integration", "full-test"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false, "headers": { @@ -373,7 +373,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition- 'item-master-simple': { "version": "1.0", "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": true }, @@ -501,7 +501,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition- "tags": ["items", "crud", "faker"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false, "headers": { @@ -616,7 +616,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition- "tags": ["items", "search", "stats"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false }, @@ -710,7 +710,7 @@ class="px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-lg transition- "tags": ["items", "bom", "integration"] }, "config": { - "baseUrl": "https://sam.kr/api/v1", + "baseUrl": "https://api.sam.kr/api/v1", "timeout": 30000, "stopOnFailure": false },