mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 13:03:16 +00:00
Add ImportStatus Resource
This commit is contained in:
parent
8c9f4da48a
commit
7dd45c23b7
1 changed files with 20 additions and 0 deletions
20
app/Http/Resources/ImportStatus.php
Normal file
20
app/Http/Resources/ImportStatus.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use App\Services\StatusService;
|
||||
|
||||
class ImportStatus extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(Request $request): array
|
||||
{
|
||||
return StatusService::get($this->status_id, false);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue