mirror of
https://github.com/elyby/accounts.git
synced 2024-12-29 08:30:19 +05:30
Add types to the ApiController
This commit is contained in:
parent
202099bf84
commit
f69ebf8221
@ -27,7 +27,7 @@ class ApiController extends Controller {
|
||||
]);
|
||||
}
|
||||
|
||||
public function actionUuidByUsername($username, $at = null) {
|
||||
public function actionUuidByUsername(string $username, int $at = null) {
|
||||
if ($at !== null) {
|
||||
/** @var UsernameHistory|null $record */
|
||||
$record = UsernameHistory::find()
|
||||
@ -61,7 +61,7 @@ class ApiController extends Controller {
|
||||
];
|
||||
}
|
||||
|
||||
public function actionUsernamesByUuid($uuid) {
|
||||
public function actionUsernamesByUuid(string $uuid) {
|
||||
try {
|
||||
$uuid = Uuid::fromString($uuid)->toString();
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
|
Loading…
Reference in New Issue
Block a user