mirror of
https://github.com/elyby/accounts.git
synced 2024-12-23 13:50:06 +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) {
|
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user