MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / findUser

Function findUser

apps/web/services/permissions/index.ts:240–254  ·  view source on GitHub ↗
(
  auth:
    | (auths & {
        users: (users & {
          account: accounts;
        })[];
      })
    | null,
  community: accounts | null
)

Source from the content-addressed store, hash-verified

238}
239
240function findUser(
241 auth:
242 | (auths & {
243 users: (users & {
244 account: accounts;
245 })[];
246 })
247 | null,
248 community: accounts | null
249) {
250 if (!community) {
251 return null;
252 }
253 return auth?.users.find((u) => u.accountsId === community.id);
254}
255
256async function findAuth(request: Request, response: Response) {
257 const session = await Session.find(request, response);

Callers 1

getMethod · 0.70

Calls 1

findMethod · 0.45

Tested by

no test coverage detected