mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-04 02:14:06 +02:00
import
This commit is contained in:
commit
3061dda018
15 changed files with 1091 additions and 0 deletions
30
Controllers/UserController.php
Normal file
30
Controllers/UserController.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php namespace Controllers;
|
||||
|
||||
use Ehesp\SteamLogin\SteamLogin;
|
||||
use Providers\AuthProvider;
|
||||
use 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