Register endpoint
This commit is contained in:
@@ -15,7 +15,7 @@ class Login extends Api
|
||||
$email = Input::post("email");
|
||||
if (empty($email)) throw new Exception("Missing email", 400);
|
||||
$password = Input::post("password");
|
||||
if (empty($password)) throw new Exception("Missing Password", 400);
|
||||
if (empty($password)) throw new Exception("Missing password", 400);
|
||||
|
||||
try {
|
||||
return Response::json(User::logIn($email, $password));
|
||||
@@ -24,9 +24,9 @@ class Login extends Api
|
||||
case "Failed":
|
||||
throw new Exception("Login failed", 500);
|
||||
case "NotFound":
|
||||
throw new Exception("User not Found", 404);
|
||||
throw new Exception("User not found", 404);
|
||||
case "Invalid":
|
||||
throw new Exception("Invalid Username or Password", 401);
|
||||
throw new Exception("Invalid username or password", 401);
|
||||
default:
|
||||
throw $err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user