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