bug fixes + dep update

This commit is contained in:
Irfan 2020-11-24 18:24:41 +05:00
parent e341d32bfe
commit 2e119957f2
4 changed files with 10 additions and 20 deletions

View File

@ -117,7 +117,6 @@ class AnimeController extends Controller
->get(); ->get();
} }
if ($results->isEmpty()) { if ($results->isEmpty()) {
return HttpResponse::notFound($request); return HttpResponse::notFound($request);
} }

View File

@ -21,7 +21,7 @@ class Person extends Model
* @var array * @var array
*/ */
protected $fillable = [ protected $fillable = [
'mal_id', 'url', 'image_url', 'website_url', 'name', 'given_name', 'family_name', 'alternative_names', 'birthday', 'member_favorites', 'about', 'voice_acting_roles', 'anime_staff_positions', 'published_manga' 'mal_id', 'url', 'images', 'website_url', 'name', 'given_name', 'family_name', 'alternative_names', 'birthday', 'member_favorites', 'about', 'voice_acting_roles', 'anime_staff_positions', 'published_manga'
]; ];
/** /**
@ -52,16 +52,6 @@ class Person extends Model
return $this->attributes['member_favorites']; return $this->attributes['member_favorites'];
} }
public function getImageAttribute()
{
$imageUrl = $this->attributes['image_url'];
return [
'jpg' => [
'image_url' => $imageUrl,
],
];
}
public static function scrape(int $id) public static function scrape(int $id)
{ {

View File

@ -15,7 +15,7 @@
"flipbox/lumen-generator": "^6", "flipbox/lumen-generator": "^6",
"illuminate/redis": "^7", "illuminate/redis": "^7",
"jenssegers/mongodb": "^4.0", "jenssegers/mongodb": "^4.0",
"jikan-me/jikan": "v3.0.0-alpha.27", "jikan-me/jikan": "3.0.0.x-dev",
"jms/serializer": "^1.13", "jms/serializer": "^1.13",
"laravel/lumen-framework": "^7.0", "laravel/lumen-framework": "^7.0",
"league/flysystem": "^1.0", "league/flysystem": "^1.0",

15
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "9f174bca74ef731ae71fc95beb18ab9d", "content-hash": "9318cd78b9c338d3a24ea12cb7488647",
"packages": [ "packages": [
{ {
"name": "brick/math", "name": "brick/math",
@ -2264,16 +2264,16 @@
}, },
{ {
"name": "jikan-me/jikan", "name": "jikan-me/jikan",
"version": "v3.0.0-alpha.27", "version": "3.0.0.x-dev",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/jikan-me/jikan.git", "url": "https://github.com/jikan-me/jikan.git",
"reference": "e99b88f1bcb0aa2c1d525f018f62c07fc7f9c0f9" "reference": "f3d62f13e4f47d934c51855971684bd1444c30c8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/jikan-me/jikan/zipball/e99b88f1bcb0aa2c1d525f018f62c07fc7f9c0f9", "url": "https://api.github.com/repos/jikan-me/jikan/zipball/f3d62f13e4f47d934c51855971684bd1444c30c8",
"reference": "e99b88f1bcb0aa2c1d525f018f62c07fc7f9c0f9", "reference": "f3d62f13e4f47d934c51855971684bd1444c30c8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2311,7 +2311,7 @@
} }
], ],
"description": "Jikan is an unofficial MyAnimeList API", "description": "Jikan is an unofficial MyAnimeList API",
"time": "2020-09-12T20:45:02+00:00" "time": "2020-11-24T13:05:29+00:00"
}, },
{ {
"name": "jms/metadata", "name": "jms/metadata",
@ -7217,7 +7217,8 @@
"aliases": [], "aliases": [],
"minimum-stability": "dev", "minimum-stability": "dev",
"stability-flags": { "stability-flags": {
"danielmewes/php-rql": 20 "danielmewes/php-rql": 20,
"jikan-me/jikan": 20
}, },
"prefer-stable": true, "prefer-stable": true,
"prefer-lowest": false, "prefer-lowest": false,