chore(payment): NHN KCP와 NICE 결제 플러그인 개발 브랜치 분리
정식 develop에서는 기본 번들 정책에 따라 제거된 결제 플러그인을 별도 개발 브랜치에서 계속 유지보수할 수 있도록 복원한다.
This commit is contained in:
1 parent
49b21e788c
commit
657f546efc
651 files changed
+49118
-20476
No files matched your search
@@ -4,7 +4,6 @@ namespace App\Http\Controllers\Api\Public;
|
||||
|
||||
use App\Http\Controllers\Api\Base\PublicBaseController;
|
||||
use App\Http\Requests\Public\Module\ServeModuleAssetRequest;
|
||||
use App\Services\ExtensionBundleService;
|
||||
use App\Services\ModuleService;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Response;
|
||||
@@ -18,54 +17,11 @@ use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
class PublicModuleController extends PublicBaseController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ModuleService $moduleService,
|
||||
private readonly ExtensionBundleService $bundleService
|
||||
private readonly ModuleService $moduleService
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* 활성 모듈 프론트엔드 IIFE 병합 번들(JS)을 서빙합니다.
|
||||
*
|
||||
* 활성 global 모듈 에셋이 없으면 빈 200 응답(text/javascript)을 반환한다
|
||||
* (프론트는 빈 스크립트 로드로 무해). 그 외에는 병합 파일을 fileResponse 로
|
||||
* 서빙(ETag/304/환경별 Cache-Control 재사용).
|
||||
*
|
||||
* @return BinaryFileResponse|Response 병합 JS 파일 응답 또는 빈 응답
|
||||
*/
|
||||
public function serveBundleJs(): BinaryFileResponse|Response
|
||||
{
|
||||
$this->logApiUsage('modules.bundle', ['kind' => 'js']);
|
||||
|
||||
$version = $this->bundleService->getCurrentVersion();
|
||||
$path = $this->bundleService->getBundleFilePath('module', 'js', $version);
|
||||
|
||||
if ($path === '') {
|
||||
return response('', 200)->header('Content-Type', 'text/javascript');
|
||||
}
|
||||
|
||||
return $this->fileResponse($path, 'text/javascript', 31536000);
|
||||
}
|
||||
|
||||
/**
|
||||
* 활성 모듈 프론트엔드 병합 번들(CSS)을 서빙합니다.
|
||||
*
|
||||
* @return BinaryFileResponse|Response 병합 CSS 파일 응답 또는 빈 응답
|
||||
*/
|
||||
public function serveBundleCss(): BinaryFileResponse|Response
|
||||
{
|
||||
$this->logApiUsage('modules.bundle', ['kind' => 'css']);
|
||||
|
||||
$version = $this->bundleService->getCurrentVersion();
|
||||
$path = $this->bundleService->getBundleFilePath('module', 'css', $version);
|
||||
|
||||
if ($path === '') {
|
||||
return response('', 200)->header('Content-Type', 'text/css');
|
||||
}
|
||||
|
||||
return $this->fileResponse($path, 'text/css', 31536000);
|
||||
}
|
||||
|
||||
/**
|
||||
* 모듈 에셋 서빙
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user