Files
outline/server/presenters/publicTeam.ts
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00

22 lines
592 B
TypeScript

import type { TOCPosition } from "@shared/types";
import { TeamPreference } from "@shared/types";
import type { Team } from "@server/models";
export default function presentPublicTeam(
/** The team to present */
team: Team,
/** Whether the branding is public */
isBrandingPublic: boolean
) {
return {
...(isBrandingPublic
? {
name: team.name,
avatarUrl: team.avatarUrl,
customTheme: team.getPreference(TeamPreference.CustomTheme),
}
: {}),
tocPosition: team.getPreference(TeamPreference.TocPosition) as TOCPosition,
};
}