mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-30 14:57:59 +00:00
The resource API is /v1/rest and the operation API is /v1/rpc: named for what they are, so neither shadows the other, and the v2-beta alias is gone. Hanzo IAM returns to /auth/callback, the callback path IAM already derives for this host, so sign-in needs no IAM change. Claude-Session: https://claude.ai/code/session_01TUxvfuta1Z44KVNYuAz71F
34 lines
934 B
TypeScript
34 lines
934 B
TypeScript
import type { OrganisationGlobalSettings } from '@prisma/client';
|
|
|
|
import { NEXT_PUBLIC_WEBAPP_URL } from '../constants/app';
|
|
|
|
export const teamGlobalSettingsToBranding = (
|
|
settings: Omit<OrganisationGlobalSettings, 'id'>,
|
|
teamId: number,
|
|
hidePoweredBy: boolean,
|
|
) => {
|
|
return {
|
|
...settings,
|
|
brandingLogo:
|
|
settings.brandingEnabled && settings.brandingLogo
|
|
? `${NEXT_PUBLIC_WEBAPP_URL()}/v1/branding/logo/team/${teamId}`
|
|
: '',
|
|
brandingHidePoweredBy: hidePoweredBy,
|
|
};
|
|
};
|
|
|
|
export const organisationGlobalSettingsToBranding = (
|
|
settings: Omit<OrganisationGlobalSettings, 'id'>,
|
|
organisationId: string,
|
|
hidePoweredBy: boolean,
|
|
) => {
|
|
return {
|
|
...settings,
|
|
brandingLogo:
|
|
settings.brandingEnabled && settings.brandingLogo
|
|
? `${NEXT_PUBLIC_WEBAPP_URL()}/v1/branding/logo/organisation/${organisationId}`
|
|
: '',
|
|
brandingHidePoweredBy: hidePoweredBy,
|
|
};
|
|
};
|