Return types

This commit is contained in:
Kilian committed 2024-07-22 02:36:28 +02:00
1 parent af588ab174
commit 2168e37413
12 files changed
+35 -46

No files matched your search

+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":