不要な判定の削除

ref: c0b76e5
This commit is contained in:
eai04191 2019-09-10 01:27:35 +09:00
parent d049a6f631
commit db39ee35c2

View File

@ -24,7 +24,6 @@ class DeviantArtResolver implements Resolver
public function resolve(string $url): Metadata public function resolve(string $url): Metadata
{ {
$res = $this->client->get('https://backend.deviantart.com/oembed?url=' . $url); $res = $this->client->get('https://backend.deviantart.com/oembed?url=' . $url);
if ($res->getStatusCode() === 200) {
$data = json_decode($res->getBody()->getContents(), true); $data = json_decode($res->getBody()->getContents(), true);
$metadata = new Metadata(); $metadata = new Metadata();
@ -36,8 +35,5 @@ class DeviantArtResolver implements Resolver
$metadata->description = 'By ' . $data['author_name']; $metadata->description = 'By ' . $data['author_name'];
return $metadata; return $metadata;
} else {
throw new \RuntimeException("{$res->getStatusCode()}: $url");
}
} }
} }