Update Avatar Migration command, use jpeg default

This commit is contained in:
Daniel Supernault 2020-12-14 23:57:28 -07:00
parent ae0f355409
commit be3ad6b15f
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -56,7 +56,7 @@ class AvatarDefaultMigration extends Command
if( $avatar->media_path == 'public/avatars/default.png' ||
$avatar->thumb_path == 'public/avatars/default.png' ||
$avatar->media_path == 'public/avatars/default.jpg' ||
$avatar->thumb_path == 'public/avatars/default.jpg' ||
$avatar->thumb_path == 'public/avatars/default.jpg'
) {
continue;
}
@ -76,8 +76,8 @@ class AvatarDefaultMigration extends Command
@unlink(storage_path('app/' . $avatar->thumb_path));
}
$avatar->media_path = 'public/avatars/default.png';
$avatar->thumb_path = 'public/avatars/default.png';
$avatar->media_path = 'public/avatars/default.jpg';
$avatar->thumb_path = 'public/avatars/default.jpg';
$avatar->change_count = $avatar->change_count + 1;
$avatar->save();