Extracts userId and userName from req.authUser (set by requireAuth middleware) so every logActivity() call automatically records who performed the action. Returns an object that can be spread into logActivity({ ...actor(req), ... }).
- Source:
Methods
(static) actor(req) → {Object|Object}
Parameters:
| Name | Type | Description |
|---|---|---|
req |
Object | Express request with |
- Source:
Returns:
- Type
- Object | Object