OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)

This commit is contained in:
wangruiguo
2026-09-03 18:49:20 +08:00
commit d647428529
3501 changed files with 1988906 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<?php
namespace Leantime\Domain\Auth\Controllers;
use Leantime\Core\Controller\Controller;
use Leantime\Domain\Auth\Services\Auth as AuthService;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
/**
* Keeping the session alive when not active
*
* @Deprecated With laravels new session management we should not need this anymore
*/
class KeepAlive 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
{
$userId = session('userdata.id');
$sessionId = session()->getId();
// @TODO: Once we have a session table, check the session is valid in there as well as
// added security layer. If not we can log the user out.
$return = $this->authService->updateUserSessionDB($userId, $sessionId);
$response = ['status' => 'ok'];
if (! $return) {
$response['status'] = 'logout';
}
return new JsonResponse($response);
}
}