* Check for migrated username * Add e2e for reserved username due to migration * Add username change test * Update username.ts * fixed type checks * Refactor to use isOrganization * Typing * Typing * Removed the isOrganization function --------- Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com>
9 lines
514 B
TypeScript
9 lines
514 B
TypeScript
import { IS_PREMIUM_USERNAME_ENABLED } from "@calcom/lib/constants";
|
|
|
|
import { checkRegularUsername } from "./checkRegularUsername";
|
|
import { usernameCheck as checkPremiumUsername } from "./username";
|
|
|
|
// TODO: Replace `lib/checkPremiumUsername` with `usernameCheck` and then import checkPremiumUsername directly here.
|
|
// We want to remove dependency on website for signup stuff as signup is now part of app.
|
|
export const checkUsername = !IS_PREMIUM_USERNAME_ENABLED ? checkRegularUsername : checkPremiumUsername;
|