chore: remove events table (#1829)
This commit is contained in:
@@ -42,14 +42,10 @@ class NotesController extends Controller
|
||||
*/
|
||||
public function store(NotesRequest $request, Contact $contact)
|
||||
{
|
||||
$note = $contact->notes()->create([
|
||||
return $contact->notes()->create([
|
||||
'account_id' => auth()->user()->account_id,
|
||||
'body' => $request->get('body'),
|
||||
]);
|
||||
|
||||
$contact->logEvent('note', $note->id, 'create');
|
||||
|
||||
return $note;
|
||||
}
|
||||
|
||||
public function toggle(NoteToggleRequest $request, Contact $contact, Note $note)
|
||||
@@ -63,8 +59,6 @@ class NotesController extends Controller
|
||||
$note->favorited_at = now();
|
||||
}
|
||||
|
||||
$contact->logEvent('note', $note->id, 'update');
|
||||
|
||||
$note->save();
|
||||
}
|
||||
|
||||
@@ -85,8 +79,6 @@ class NotesController extends Controller
|
||||
+ ['account_id' => $contact->account_id]
|
||||
);
|
||||
|
||||
$contact->logEvent('note', $note->id, 'update');
|
||||
|
||||
return $note;
|
||||
}
|
||||
|
||||
@@ -100,7 +92,5 @@ class NotesController extends Controller
|
||||
public function destroy(Contact $contact, Note $note)
|
||||
{
|
||||
$note->delete();
|
||||
|
||||
$contact->events()->forObject($note)->get()->each->delete();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user