MCPcopy
hub / github.com/CapSoftware/Cap / makeCurrentUser

Function makeCurrentUser

packages/web-backend/src/Auth.ts:43–51  ·  view source on GitHub ↗
(
	user: Option.Option.Value<Effect.Effect.Success<typeof getCurrentUser>>,
)

Source from the content-addressed store, hash-verified

41}).pipe(Effect.withSpan("getCurrentUser"));
42
43export const makeCurrentUser = (
44 user: Option.Option.Value<Effect.Effect.Success<typeof getCurrentUser>>,
45) =>
46 CurrentUser.of({
47 id: user.id,
48 email: user.email,
49 activeOrganizationId: user.activeOrganizationId,
50 iconUrlOrKey: Option.fromNullable(user.image),
51 });
52
53export const makeCurrentUserLayer = (
54 user: Option.Option.Value<Effect.Effect.Success<typeof getCurrentUser>>,

Callers 2

Rpcs.tsFile · 0.90
makeCurrentUserLayerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected