19 lines
310 B
PHP
19 lines
310 B
PHP
<?php
|
|
|
|
namespace Api\Logout;
|
|
|
|
use Khofmann\Api\Api;
|
|
use Khofmann\Models\User\User;
|
|
use Khofmann\Request\Request;
|
|
use Khofmann\Response\Response;
|
|
|
|
class Logout extends Api
|
|
{
|
|
public function post(): void
|
|
{
|
|
$token = Request::header("token");
|
|
|
|
Response::json(User::getByToken($token)->logOut());
|
|
}
|
|
}
|