fix(client-service): hide service/vm ids, mask vm password, encrypt module_vmware.password
- detail response drops id and vm.id/vmware_id, password returns *****
- GET client-service/{uuid}/vm-password returns the decrypted password to the owner
- renew accepts service uuid
- EncryptedOrLegacy cast for module_vmware.password
- vps specs: addon ram is stored in MB, convert to GB
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
66c7c0a6c3
commit
3c7710f1de
@@ -361,10 +361,14 @@ class OrderControllerRefactor extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function renewService(RenewServiceRequest $request, int $id): JsonResponse
|
||||
public function renewService(RenewServiceRequest $request, string $id): JsonResponse
|
||||
{
|
||||
if (! ctype_digit($id)) {
|
||||
$id = (string) \App\Models\Service::where('uuid', $id)->where('customer_id', $request->user()->id)->value('id');
|
||||
}
|
||||
|
||||
$result = $this->orderQueryService->renewService(
|
||||
$id,
|
||||
(int) $id,
|
||||
$request->user(),
|
||||
(int) $request->validated()['months'],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user