export function curateRevision(revision) { return { id: revision.id, sceneId: revision.scene_id, actorId: revision.actor_id, base: revision.base, deltas: revision.deltas, hash: revision.hash, comment: revision.comment, user: revision.user_id && { id: revision.user_id, username: revision.username, }, review: typeof revision.approved === 'boolean' ? { isApproved: revision.approved, userId: revision.reviewed_by, username: revision.reviewer_username, reviewedAt: revision.reviewed_at, } : null, appliedAt: revision.applied_at, failed: revision.failed, createdAt: revision.created_at, }; }