Add audit things.

This commit is contained in:
James Cole
2023-12-29 12:06:23 +01:00
parent 5b8f67e992
commit 47147066d2
13 changed files with 32 additions and 14 deletions

View File

@@ -59,11 +59,12 @@ class StoreController extends Controller
*/
public function store(CreateRequest $request): JsonResponse
{
$data = $request->getData();
if(false === config('firefly.allow_webhooks')) {
Log::channel('audit')->info('User tries to store new webhook, but webhooks are DISABLED.', $data);
throw new NotFoundHttpException('Webhooks are not enabled.');
}
$data = $request->getData();
$webhook = $this->repository->store($data);
$manager = $this->getManager();