asdasd
All checks were successful
Deploy / deploy-staging (push) Successful in 23s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-21 02:21:10 +02:00
parent cf3dacfd6b
commit 5c615aa878
3 changed files with 101 additions and 42 deletions

View File

@@ -257,6 +257,11 @@ final class Router
Http::json(['data' => $this->savePayout($projectKey, Http::input())], 201);
}
if (preg_match('~^payouts/(\d+)$~', $resource, $matches) && $method === 'DELETE') {
$this->deletePayout($projectKey, (int) $matches[1]);
Http::json(['data' => ['deleted' => true]]);
}
if ($resource === 'wallet-snapshots' && $method === 'GET') {
Http::json(['data' => $this->walletSnapshots($projectKey)]);
}
@@ -1766,6 +1771,11 @@ final class Router
return $this->repository()->savePayout($projectKey, $payload);
}
private function deletePayout(string $projectKey, int $payoutId): void
{
$this->repository()->deletePayout($projectKey, $payoutId);
}
private function walletSnapshots(string $projectKey): array
{
return $this->repository()->listWalletSnapshots($projectKey, 100);