Skip to content

A free open source IT asset/license management system

Move comment location

Marcus Mooreeb2d7b1f4f26
diff --git a/app/Http/Controllers/Api/NotesController.php b/app/Http/Controllers/Api/NotesController.php
index 1206445c37..55ec5a3623 100644
--- a/app/Http/Controllers/Api/NotesController.php
+++ b/app/Http/Controllers/Api/NotesController.php
@@ -22,10 +22,10 @@ class NotesController extends Controller
],
]);
- $item = Asset::findOrFail($request->input("id"));
- $this->authorize('update', $item);
// This can be made dynamic by using $request->input('type') to determine which model type to add the note to.
// For now, we are only placing this on Assets
+ $item = Asset::findOrFail($request->input("id"));
+ $this->authorize('update', $item);
event(new NoteAdded($item, Auth::user(), $validated['note']));