cal.pub0.org/packages/trpc/server/routers/loggedInViewer/avatar.handler.ts

14 lines
263 B
TypeScript

import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
type AvatarOptions = {
ctx: {
user: NonNullable<TrpcSessionUser>;
};
};
export const avatarHandler = async ({ ctx }: AvatarOptions) => {
return {
avatar: ctx.user.rawAvatar,
};
};