MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / toPublicUserProfile

Function toPublicUserProfile

apps/api/src/api/users/users.utils.ts:3–11  ·  view source on GitHub ↗
(user: IUser)

Source from the content-addressed store, hash-verified

1import type { IPublicUserProfile, IUser } from "./users.types";
2
3export const toPublicUserProfile = (user: IUser): IPublicUserProfile => ({
4 id: user.id,
5 email: user.email,
6 firstName: user.firstName,
7 lastName: user.lastName,
8 emailVerified: user.emailVerifiedAt !== null,
9 createdAt: user.createdAt,
10 updatedAt: user.updatedAt,
11});

Callers 4

getProfileMethod · 0.90
getMeMethod · 0.90
updateProfileMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected