cal/packages/lib/getBookerUrl/server.ts
Udit Takkar 8c8401330a
fix: preview url for booking page (#12973)
* fix: preview url for booking page

* chore: use cal url

* chore: fix tests

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
2024-01-02 14:00:00 +00:00

13 lines
461 B
TypeScript

import { CAL_URL } from "../constants";
import { getBrand } from "../server/getBrand";
export const getBookerBaseUrl = async (user: { organizationId: number | null }) => {
const orgBrand = await getBrand(user.organizationId);
return orgBrand?.fullDomain ?? CAL_URL;
};
export const getTeamBookerUrl = async (team: { organizationId: number | null }) => {
const orgBrand = await getBrand(team.organizationId);
return orgBrand?.fullDomain ?? CAL_URL;
};