MCPcopy Create free account
hub / github.com/async-labs/async / publicFields

Method publicFields

api/server/models/User.ts:467–500  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

465class UserClass extends mongoose.Model {
466 // review if you need this method at private-api
467 public static publicFields(): string[] {
468 return [
469 '_id',
470 'id',
471 'email',
472 'accountCreationDate',
473 'userName',
474 'userAvatarUrl',
475 'showDarkTheme',
476
477 'onlineStatusByTeam',
478
479 'teamsForTeamLeader',
480 'teamsForTeamMember',
481 'defaultTeamId',
482
483 'stripeCard',
484 'stripeCustomer',
485
486 'pinnedDiscussionIds',
487 'pinnedChatIds',
488
489 'unreadCommentIds',
490 'unreadByUserMessageIds',
491 'unreadBySomeoneMessageIds',
492
493 'trialPeriodStartDate',
494 'isSubscriptionActiveForAccount',
495 'isPaymentFailedForAccount',
496 'stripeSubscription',
497 'stripeListOfInvoices',
498 'numberOfUniqueActiveTeamMembers',
499 ];
500 }
501
502 public static async registerOrLogIn({ uid, email, isLoginEvent, teamId }) {
503 const user = await this.findOne({ email }).setOptions({ lean: true });

Callers 1

registerOrLogInMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected