mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Add types to the ApiController
This commit is contained in:
@ -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) {
|
if ($at !== null) {
|
||||||
/** @var UsernameHistory|null $record */
|
/** @var UsernameHistory|null $record */
|
||||||
$record = UsernameHistory::find()
|
$record = UsernameHistory::find()
|
||||||
@ -61,7 +61,7 @@ class ApiController extends Controller {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function actionUsernamesByUuid($uuid) {
|
public function actionUsernamesByUuid(string $uuid) {
|
||||||
try {
|
try {
|
||||||
$uuid = Uuid::fromString($uuid)->toString();
|
$uuid = Uuid::fromString($uuid)->toString();
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
|
Reference in New Issue
Block a user