Function
toDecision
(organizationId: string, allowed: boolean)
Source from the content-addressed store, hash-verified
| 136 | }; |
| 137 | |
| 138 | const toDecision = (organizationId: string, allowed: boolean): GateDecision => |
| 139 | allowed |
| 140 | ? { blocked: false } |
| 141 | : { |
| 142 | blocked: true, |
| 143 | error: new ExecutionLimitReachedError({ |
| 144 | organizationId, |
| 145 | message: EXECUTION_LIMIT_BLOCKED_MESSAGE, |
| 146 | }), |
| 147 | }; |
| 148 | |
| 149 | const decide = (organizationId: string): Effect.Effect<GateDecision> => |
| 150 | Effect.suspend(() => { |
Tested by
no test coverage detected