Return types
This commit is contained in:
@@ -10,7 +10,7 @@ use Khofmann\Models\User\User;
|
||||
|
||||
class Login extends Api
|
||||
{
|
||||
public function post()
|
||||
public function post(): void
|
||||
{
|
||||
$email = Input::post("email");
|
||||
if (empty($email)) throw new Exception("Missing email", 400);
|
||||
@@ -18,7 +18,7 @@ class Login extends Api
|
||||
if (empty($password)) throw new Exception("Missing password", 400);
|
||||
|
||||
try {
|
||||
return Response::json(User::logIn($email, $password));
|
||||
Response::json(User::logIn($email, $password));
|
||||
} catch (Exception $err) {
|
||||
switch ($err->getMessage()) {
|
||||
case "Failed":
|
||||
|
||||
Reference in New Issue
Block a user