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