forked from mirror/pixelfed
Update ApiV1Controller, fix favourites endpoints
This commit is contained in:
parent
5de6d8accb
commit
d6d99385db
1 changed files with 4 additions and 4 deletions
|
@ -1039,8 +1039,8 @@ class ApiV1Controller extends Controller
|
|||
LikePipeline::dispatch($like);
|
||||
}
|
||||
|
||||
$resource = new Fractal\Resource\Item($status, new StatusTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
$res = StatusService::getMastodon($status->id, false);
|
||||
$res['favourited'] = true;
|
||||
return response()->json($res);
|
||||
}
|
||||
|
||||
|
@ -1079,8 +1079,8 @@ class ApiV1Controller extends Controller
|
|||
|
||||
StatusService::del($status->id);
|
||||
|
||||
$resource = new Fractal\Resource\Item($status, new StatusTransformer());
|
||||
$res = $this->fractal->createData($resource)->toArray();
|
||||
$res = StatusService::getMastodon($status->id, false);
|
||||
$res['favourited'] = false;
|
||||
return response()->json($res);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue