Skip to content

Commit b0d0ac1

Browse files
committed
Clarify meta data when writing event log
1 parent d6dffbe commit b0d0ac1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/controllers/Packet/Create.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ public function &run(Router &$router, View &$view, array &$args)
5353
EventTypes::PACKET_CREATED,
5454
$model->active_user->getId(),
5555
getenv('REMOTE_ADDR'),
56-
json_encode(['model' => $model, 'view' => get_class($view)])
56+
json_encode([
57+
'active_user' => $model->active_user,
58+
'new_packet' => $model->packet,
59+
'products' => $model->products,
60+
])
5761
);
5862
}
5963

src/controllers/Packet/Edit.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ public function &run(Router &$router, View &$view, array &$args)
7777
EventTypes::PACKET_EDITED,
7878
$model->active_user->getId(),
7979
getenv('REMOTE_ADDR'),
80-
json_encode(['model' => $model, 'view' => get_class($view)])
80+
json_encode([
81+
'active_user' => $model->active_user,
82+
'edited_packet' => $model->packet,
83+
'products' => $model->products,
84+
])
8185
);
8286
}
8387

0 commit comments

Comments
 (0)