Commit 8ac49ea8 by 庄欣

fix bug

parent dfbc8057
......@@ -144,6 +144,18 @@ class User extends ControllerBase
}
}
public function show($id, $query = "", $checkUid = true)
{
try {
$client = app("client");
$res = $client->get($this->prefix."/u/".$id);
return Response::success($res);
} catch (ApiUnauthorized $e) {
return Response::error($e->getMessage(), HttpStatus::HttpUnauthorized);
} catch (\Exception $e) {
return Response::error($e->getMessage());
}
}
protected function ImgEncode($url)
{
......@@ -176,4 +188,5 @@ class User extends ControllerBase
}
return Cache::get($token);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment