Router work

This commit is contained in:
Julien Valverdé
2024-07-05 19:31:35 +02:00
parent a49843ec89
commit bb1a422097
4 changed files with 17 additions and 19 deletions

View File

@@ -13,13 +13,13 @@ export class TRPCContextCreator extends Context.Tag("TRPCContextCreator")<TRPCCo
export module TRPCContextCreator {
export const Live = Layer.effect(TRPCContextCreator, Effect.gen(function*() {
const run = yield* Effect.runtime<Services>().pipe(
Effect.map(Runtime.runPromise)
)
const runtime = yield* Effect.runtime<Services>()
const run = Runtime.runPromise(runtime)
return ({ req }) => ({
req,
runtime,
run,
req,
})
}))
}