Update to created_by

This commit is contained in:
Marcus Moore 2024-09-26 12:41:16 -07:00
parent 2004e58b53
commit e974c96eda
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -140,7 +140,7 @@ class LogListener
$logaction->item_id = $event->itemNoteAddedOn->id;
$logaction->item_type = get_class($event->itemNoteAddedOn);
$logaction->note = $event->note; //this is the received alphanumeric text from the box
$logaction->user_id = $event->noteAddedBy->id;
$logaction->created_by = $event->noteAddedBy->id;
$logaction->action_type = 'note_added';
$logaction->save();
}

View file

@ -47,7 +47,7 @@ class LogListenerTest extends TestCase
$this->assertDatabaseHas('action_logs', [
'action_type' => 'note_added',
'user_id' => $noteAddedBy->id,
'created_by' => $noteAddedBy->id,
'item_id' => $asset->id,
'item_type' => Asset::class,
'note' => 'My Cool Note!',