mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-17 17:57:09 +00:00
Various code cleanup and fixed alignments.
This commit is contained in:
@@ -59,15 +59,15 @@ class UpdateController extends Controller
|
||||
*/
|
||||
public function update(Webhook $webhook, UpdateRequest $request): JsonResponse
|
||||
{
|
||||
$data = $request->getData();
|
||||
$data = $request->getData();
|
||||
if(false === config('firefly.allow_webhooks')) {
|
||||
Log::channel('audit')->info(sprintf('User tries to update webhook #%d, but webhooks are DISABLED.', $webhook->id), $data);
|
||||
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
}
|
||||
|
||||
$webhook = $this->repository->update($webhook, $data);
|
||||
$manager = $this->getManager();
|
||||
$webhook = $this->repository->update($webhook, $data);
|
||||
$manager = $this->getManager();
|
||||
|
||||
Log::channel('audit')->info(sprintf('User updates webhook #%d', $webhook->id), $data);
|
||||
|
||||
@@ -75,7 +75,7 @@ class UpdateController extends Controller
|
||||
$transformer = app(WebhookTransformer::class);
|
||||
$transformer->setParameters($this->parameters);
|
||||
|
||||
$resource = new Item($webhook, $transformer, 'webhooks');
|
||||
$resource = new Item($webhook, $transformer, 'webhooks');
|
||||
|
||||
return response()->json($manager->createData($resource)->toArray())->header('Content-Type', self::CONTENT_TYPE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user