zhangchangchun 5 years ago
parent
commit
fc70626d21
1 changed files with 3 additions and 1 deletions
  1. 3 1
      app/Http/Controllers/MemberStatisticsController.php

+ 3 - 1
app/Http/Controllers/MemberStatisticsController.php

@@ -30,6 +30,8 @@ class MemberStatisticsController extends Controller {
             return $this->response->error($validator->errors()->first(), 500);
         }
         $info = $this->memberStatistics->view($data['uid']);
-        return $this->response->item($info, new CommunityMemberStatisticsTransformer());
+        if($info){
+            return $this->response->item($info, new CommunityMemberStatisticsTransformer());
+        }
     }
 }