mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-04 02:14:06 +02:00
split off infocontroller
This commit is contained in:
parent
7a6ff09eee
commit
66d177e23a
6 changed files with 55 additions and 36 deletions
|
|
@ -70,12 +70,4 @@ class DemoController extends BaseController {
|
|||
public function chat($demoId) {
|
||||
\Flight::json($this->demoProvider->getChat($demoId));
|
||||
}
|
||||
|
||||
public function listMaps() {
|
||||
\Flight::json($this->demoProvider->listMaps());
|
||||
}
|
||||
|
||||
public function stats() {
|
||||
\Flight::json($this->demoProvider->getStats());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
25
src/Controllers/InfoController.php
Normal file
25
src/Controllers/InfoController.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php namespace Demostf\API\Controllers;
|
||||
|
||||
use Demostf\API\Providers\InfoProvider;
|
||||
|
||||
class InfoController extends BaseController {
|
||||
/** @var InfoProvider */
|
||||
private $infoProvider;
|
||||
|
||||
/**
|
||||
* InfoController constructor.
|
||||
*
|
||||
* @param InfoProvider $infoProvider
|
||||
*/
|
||||
public function __construct(InfoProvider $infoProvider) {
|
||||
$this->infoProvider = $infoProvider;
|
||||
}
|
||||
|
||||
public function listMaps() {
|
||||
\Flight::json($this->infoProvider->listMaps());
|
||||
}
|
||||
|
||||
public function stats() {
|
||||
\Flight::json($this->infoProvider->getStats());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue