Explorar o código

Update v1.1 api

Daniel Supernault %!s(int64=2) %!d(string=hai) anos
pai
achega
08ab19f0ea
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Http/Controllers/Api/ApiV1Dot1Controller.php

+ 1 - 1
app/Http/Controllers/Api/ApiV1Dot1Controller.php

@@ -388,7 +388,7 @@ class ApiV1Dot1Controller extends Controller
         abort_if(!$user, 403);
         abort_if(!$user, 403);
         abort_if($user->status != null, 403);
         abort_if($user->status != null, 403);
 
 
-        $res = $user->tokens->map(function($token, $key) {
+        $res = $user->tokens->sortByDesc('created_at')->take(10)->map(function($token, $key) {
             return [
             return [
                 'id' => $key + 1,
                 'id' => $key + 1,
                 'did' => encrypt($token->id),
                 'did' => encrypt($token->id),