()
| 19 | ); |
| 20 | |
| 21 | const noOrganization = () => |
| 22 | HttpServerResponse.jsonUnsafe( |
| 23 | { |
| 24 | error: "No organization in session", |
| 25 | code: "no_organization", |
| 26 | }, |
| 27 | { status: 403 }, |
| 28 | ); |
| 29 | |
| 30 | const OrgAuthMiddleware = HttpRouter.middleware<{ provides: AuthContext }>()( |
| 31 | Effect.gen(function* () { |