<?php
namespace ProVM\Money\Common\Controller;

use Psr\Container\ContainerInterface as Container;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use ProVM\Common\Define\Controller\Json;
use ProVM\Money\Common\Service\Update as Updater;

class Update {
  use Json;

  public function __invoke(Request $request, Response $response, Updater $updater): Response {
    $output = $updater->update();
    return $this->withJson($response, $output);
  }
}
