<?php
use ProVM\Money\Common\Controller\Aliases;

$app->group('/aliases', function($app) {
  $app->post('/add[/]', [Aliases::class, 'add']);
  $app->get('[/]', Aliases::class);
  $app->options('[/]', function (Request $request, Response $response): Response {
    return $response;
  });
});

$app->group('/alias/{alias_id}', function($app) {
  $app->put('/edit[/]', [Aliases::class, 'edit']);
  $app->delete('/delete[/]', [Aliases::class, 'delete']);
  $app->get('[/]', [Aliases::class, 'get']);
  $app->options('[/]', function (Request $request, Response $response): Response {
    return $response;
  });
});
