mirror of https://github.com/pixelfed/pixelfed.git
Update ApiV1Controller, fix favourites endpoints
This commit is contained in:
parent
5de6d8accb
commit
d6d99385db
|
@ -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 New Issue