Return types

This commit is contained in:
2024-07-22 02:36:28 +02:00
parent af588ab174
commit 2168e37413
12 changed files with 35 additions and 46 deletions
+2 -2
View File
@@ -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":