mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
upload framework
This commit is contained in:
parent
754b1ce108
commit
a1a9504f11
30 changed files with 1578 additions and 155 deletions
30
src/Controllers/UserController.php
Normal file
30
src/Controllers/UserController.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php namespace Demostf\API\Controllers;
|
||||
|
||||
use Ehesp\SteamLogin\SteamLogin;
|
||||
use Demostf\API\Providers\AuthProvider;
|
||||
use Demostf\API\Providers\UserProvider;
|
||||
|
||||
class UserController extends BaseController {
|
||||
/**
|
||||
* @var UserProvider
|
||||
*/
|
||||
private $userProvider;
|
||||
|
||||
/**
|
||||
* UserController constructor.
|
||||
*
|
||||
* @param UserProvider $userProvider
|
||||
*/
|
||||
public function __construct(UserProvider $userProvider) {
|
||||
$this->userProvider = $userProvider;
|
||||
}
|
||||
|
||||
public function get($steamid) {
|
||||
\Flight::json($this->userProvider->get($steamid));
|
||||
}
|
||||
|
||||
public function search() {
|
||||
$query = $this->query('query', '');
|
||||
\Flight::json($this->userProvider->search($query));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue