Files
outline/server/presenters/publicTeam.ts
Tom Moor 2f9a56aa6f Centralize default user and team preferences. (#5172
Passing the fallback at each callpoint was dumb
2023-04-09 14:23:58 -07:00

11 lines
279 B
TypeScript

import { TeamPreference } from "@shared/types";
import { Team } from "@server/models";
export default function presentPublicTeam(team: Team) {
return {
name: team.name,
avatarUrl: team.avatarUrl,
customTheme: team.getPreference(TeamPreference.CustomTheme),
};
}