[yggdrasil-api] remove unserialize

This commit is contained in:
Asnxthaony 2020-06-07 22:15:54 +08:00
parent 9d1e8ff24c
commit ae7b46572b
No known key found for this signature in database
GPG Key ID: 1D36B94AA9417589
2 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "yggdrasil-api",
"version": "4.7.0",
"version": "4.7.1",
"title": "Yggdrasil API",
"description": "Yggdrasil API + authlib-injector = ✨",
"author": "printempw",

View File

@ -46,9 +46,8 @@ class Token
*/
public static function lookup(string $accessToken)
{
$cache = Cache::get("TOKEN_$accessToken");
if ($cache) {
$token = unserialize($cache);
$token = Cache::get("TOKEN_$accessToken");
if ($token) {
if ($token->isRefreshable()) {
return $token;
} else {