MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / formatProfileDiffLogs

Function formatProfileDiffLogs

utils/logs.js:101–110  ·  view source on GitHub ↗
(logsSnapshot, usersMap, type)

Source from the content-addressed store, hash-verified

99}
100
101function formatProfileDiffLogs(logsSnapshot, usersMap, type) {
102 const { meta, body } = logsSnapshot;
103 const actionKey = type === logType.PROFILE_DIFF_APPROVED ? "approvedBy" : "rejectedBy";
104 return {
105 user: usersMap[meta.userId]?.username,
106 message: body.message,
107 // eslint-disable-next-line security/detect-object-injection
108 [actionKey]: usersMap[meta[actionKey]]?.username,
109 };
110}
111
112function formatTaskRequestsLogs(logsSnapshot, usersMap, tasksMap) {
113 const { meta, body } = logsSnapshot;

Callers 1

formatLogsForFeedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected