Docs
This commit is contained in:
@@ -9,8 +9,23 @@ use Khofmann\Input\Input;
|
||||
use Khofmann\Response\Response;
|
||||
use Khofmann\Models\User\User;
|
||||
|
||||
/**
|
||||
* Login route handlers
|
||||
*/
|
||||
class Login extends Api
|
||||
{
|
||||
/**
|
||||
* Login POST handler
|
||||
*
|
||||
* Log in a user. Required inputs are `email` and `password`.
|
||||
*
|
||||
* Returns user and tokens
|
||||
*
|
||||
* @throws 400 Missing field
|
||||
* @throws 401 Invalid credentials (login fails)
|
||||
* @throws 404 User not found
|
||||
* @throws 500 Failed to log in user
|
||||
*/
|
||||
public function post(): void
|
||||
{
|
||||
// Fetch all required inputs.
|
||||
|
||||
Reference in New Issue
Block a user