This commit is contained in:
2021-06-28 23:15:13 -04:00
parent 0061a3d920
commit f4a8db56ff
93 changed files with 2422 additions and 0 deletions

View File

@ -0,0 +1,27 @@
<?php
namespace ProVM\Crypto\Common\Controller;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use ProVM\Common\Define\Controller\JSON;
use ProVM\Crypto\Common\Service\Update as Updater;
class Update {
use JSON;
public function __invoke(Request $request, Response $response, Updater $updater) {
$result = $updater->run();
$output = [
'result' => $result
];
return $this->withJson($response, $output);
}
public function register(Request $request, Response $response, Updater $updater, $coin_id, $type) {
$result = $updater->register($coin_id, $type);
$output = [
'input' => ['coin_id' => $coin_id, 'type' => $type],
'result' => $result
];
return $this->withJson($response, $output);
}
}