Skip to content

Commit

Permalink
Fix CP Exception when editing an image / asset (#7131)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurperton committed Nov 28, 2022
1 parent 391fb2c commit e1c9499
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Http/Controllers/CP/Assets/AssetsController.php
Expand Up @@ -56,7 +56,11 @@ public function update(Request $request, $asset)

$asset->save();

return ['success' => true, 'message' => 'Asset updated', 'asset' => new AssetResource($asset)];
return [
'success' => true,
'message' => 'Asset updated',
'asset' => (new AssetResource($asset))->resolve()['data'],
];
}

public function store(Request $request)
Expand Down

0 comments on commit e1c9499

Please sign in to comment.