OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
31
app/Domain/Auth/Controllers/Logout.php
Normal file
31
app/Domain/Auth/Controllers/Logout.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Auth\Controllers;
|
||||
|
||||
use Leantime\Core\Controller\Controller;
|
||||
use Leantime\Core\Controller\Frontcontroller as FrontcontrollerCore;
|
||||
use Leantime\Domain\Auth\Services\Auth as AuthService;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class Logout extends Controller
|
||||
{
|
||||
private AuthService $authService;
|
||||
|
||||
/**
|
||||
* init - initialize private variables
|
||||
*/
|
||||
public function init(AuthService $authService): void
|
||||
{
|
||||
$this->authService = $authService;
|
||||
}
|
||||
|
||||
/**
|
||||
* get - handle get requests
|
||||
*/
|
||||
public function get(array $params): Response
|
||||
{
|
||||
$this->authService->logout();
|
||||
|
||||
return FrontcontrollerCore::redirect(BASE_URL.'/');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user