mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
allow more steamid formats in user api
This commit is contained in:
parent
13e6f950d2
commit
ecb9e41999
4 changed files with 11 additions and 11 deletions
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Demostf\API\Controllers;
|
||||
|
||||
use Demostf\API\Demo\Parser;
|
||||
use Demostf\API\Providers\UserProvider;
|
||||
use flight\net\Request;
|
||||
use flight\net\Response;
|
||||
|
|
@ -20,6 +21,9 @@ class UserController extends BaseController {
|
|||
}
|
||||
|
||||
public function get($steamId) {
|
||||
if (!is_numeric($steamId)) {
|
||||
$steamId = Parser::convertSteamIdToCommunityId($steamId);
|
||||
}
|
||||
\Flight::json($this->userProvider->get($steamId));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue