add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
@@ -48,7 +48,7 @@ class RefundController extends BaseApiController
public function show(int $refundId): JsonResponse
{
$refund = $this->queryService->find($refundId);
if (! $refund) {
if (!$refund) {
return response()->json(['ok' => false, 'message' => 'Refund not found.'], 404);
}
@@ -71,7 +71,6 @@ class RefundController extends BaseApiController
$result = $this->requestService->requestRefund($payload, $guard);
} catch (\Throwable $e) {
Log::error('Refund request failed.', ['error' => $e->getMessage()]);
return response()->json(['ok' => false, 'message' => 'Failed to submit refund request.'], 500);
}
@@ -213,6 +212,9 @@ class RefundController extends BaseApiController
]);
}
/**
* @return int|JsonResponse
*/
private function authenticatedUserIdOrUnauthorized(): int|JsonResponse
{
$userId = (int) (auth()->id() ?? 0);