getUser($request), $resource)) { throw new AuthorizationFailedException(); } $body = $request->getParsedBody(); $custom_file = new CustomFile( $body['data']['id'], $args['id'], $body['data']['attributes'] ); return $this->getContentResponse( $resource->type->updateCustomFileMetadata( $args['file_id'], $custom_file) ); } }