Initial commit: Memind H5 portal with MindSpace, Plaza, and agent jobs.
Track application source and tests; exclude local env, user workspaces, and runtime data via .gitignore. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
export function createMindSpaceAuditWriter(pool) {
|
||||
const write = async ({
|
||||
userId,
|
||||
action,
|
||||
objectType,
|
||||
objectId,
|
||||
ip = null,
|
||||
result = 'success',
|
||||
riskLevel = null,
|
||||
now = Date.now(),
|
||||
}) => {
|
||||
if (!pool) return;
|
||||
await pool.query(
|
||||
`INSERT INTO h5_mindspace_audit_logs
|
||||
(user_id, action, object_type, object_id, ip, result, risk_level, created_at)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,
|
||||
[userId, action, objectType, objectId, ip, result, riskLevel, now],
|
||||
);
|
||||
};
|
||||
|
||||
return { write };
|
||||
}
|
||||
Reference in New Issue
Block a user