asdasd
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user