<?php
namespace Api\Controllers\V1;

use Api\Core\Request;
use Api\Core\Response;

class UsersController {
    public function index(Request $req, Response $res) {
        return $res->json([
            'users' => ['Mario', 'Luigi']
        ]);
    }

    public function create(Request $req, Response $res) {
        $data = $req->body();
        return $res->json([
            'created' => $data
        ], 201);
    }
}
