Skip to content

Commit

Permalink
Merge pull request #4321 from coralproject/fix/CORL-2859-flair-badges…
Browse files Browse the repository at this point in the history
…-default

[CORL-2859]: add defaults for flair badge config
  • Loading branch information
tessalt authored Aug 22, 2023
2 parents 39370ab + e5af8e3 commit 88ddf0a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/core/server/graph/resolvers/Settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,15 @@ export const Settings: GQLSettingsTypeResolver<Tenant> = {
args,
ctx
) => embeddedComments,
flairBadges: ({
flairBadges = { flairBadgesEnabled: false, badges: [] },
}) => {
if (!flairBadges.badges) {
return {
flairBadgesEnabled: flairBadges.flairBadgesEnabled ?? false,
badges: [],
};
}
return flairBadges;
},
};

0 comments on commit 88ddf0a

Please sign in to comment.