<?php

use Server\Controllers\TradersController;

// Traders API

$app->get('/api/traders', TradersController::class . ':list');

$app->post('/api/traders', TradersController::class . ':create')->add($admin_logged_in);

$app->get('/api/traders/{attr}', TradersController::class . ':read');

$app->patch('/api/traders', TradersController::class . ':update')->add($admin_logged_in);

$app->post('/api/traders/{attr}/photo', TradersController::class . ':updatePhoto')->add($admin_logged_in);

$app->post('/api/traders/search', TradersController::class . ':search');
