refactor: Remove extensive unused administrative UI, styling, and JavaScript assets, and introduce a new payment API controller.
This commit is contained in:
@@ -174,11 +174,22 @@ class ServiceController extends Controller
|
||||
return response()->json([
|
||||
'error' => false,
|
||||
'message' => 'Lấy dữ liệu thành công',
|
||||
'page_type' => 'service',
|
||||
'page_type' => $this->resolvePageType($product->product_type),
|
||||
'data' => new ServiceResource($product),
|
||||
]);
|
||||
}
|
||||
|
||||
private function resolvePageType(?string $productType): string
|
||||
{
|
||||
return match ($productType) {
|
||||
'vps', 'cloud' => 'service_vps',
|
||||
'hosting', 'email', 'ssl' => 'service_hosting',
|
||||
'domain' => 'service_domain',
|
||||
'blog' => 'blog',
|
||||
default => 'service_vps',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Get addons for a specific product
|
||||
* GET /v1/products/{productId}/addons
|
||||
|
||||
Reference in New Issue
Block a user