Fix gravatar url check
This commit is contained in:
@@ -15,7 +15,7 @@ class User extends Resource
|
||||
$res = [
|
||||
'id' => $this->id,
|
||||
'pilot_id' => $this->pilot_id,
|
||||
'avatar' => $this->avatar,
|
||||
'avatar' => $this->avatar->url,
|
||||
'ident' => $this->ident,
|
||||
'name' => $this->name,
|
||||
'email' => $this->email,
|
||||
|
||||
@@ -143,7 +143,9 @@ class User extends Authenticatable
|
||||
public function getAvatarAttribute()
|
||||
{
|
||||
if (!$this->attributes['avatar']) {
|
||||
return $this->gravatar();
|
||||
return new File([
|
||||
'path' => $this->gravatar(),
|
||||
]);
|
||||
}
|
||||
|
||||
return new File([
|
||||
|
||||
Reference in New Issue
Block a user