Module: utils/actor

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 authUser set by requireAuth and workspaceId set by workspaceScope.

Source:
Returns:
Type
Object | Object