Skip to content

Commit

Permalink
add comments; remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
kabeaty committed Aug 10, 2023
1 parent e85cc9c commit 29bd1ae
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ const enhanced = withFragmentContainer<Props>({
...FeaturedByConfig_formValues @relay(mask: false)
...ReactionConfig_formValues @relay(mask: false)
...BadgeConfig_formValues @relay(mask: false)
# ...FlairBadgeConfig_formValues @relay(mask: false)
...FlairBadgeConfigContainer_settings
...RTEConfig_formValues @relay(mask: false)
...MediaLinksConfig_formValues @relay(mask: false)
Expand Down
4 changes: 4 additions & 0 deletions src/core/common/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export enum ERROR_CODES {
*/
DUPLICATE_STORY_URL = "DUPLICATE_STORY_URL",

/**
* DUPLICATE_FLAIR_BADGE is used when trying to create a flair badge for a
* tenant that already includes that flair badge.
*/
DUPLICATE_FLAIR_BADGE = "DUPLICATE_FLAIR_BADGE",

/**
Expand Down
31 changes: 31 additions & 0 deletions src/core/server/graph/schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1706,6 +1706,10 @@ type BadgeConfiguration {
adminLabel: String!
}

"""
FlairBadgeConfiguration specifies the configuration for flair badges, including
whether they are enabled and any configured image urls.
"""
type FlairBadgeConfiguration {
flairBadgesEnabled: Boolean
flairBadgeURLs: [String!]
Expand Down Expand Up @@ -2207,6 +2211,10 @@ type Settings @cacheControl(maxAge: 30) {
"""
embeddedComments: EmbeddedCommentsConfiguration

"""
flairBadges specifies the configuration for flair badges, including whether
they are enabled and any configured image urls
"""
flairBadges: FlairBadgeConfiguration
}

Expand Down Expand Up @@ -5575,6 +5583,10 @@ input RTEConfigurationInput {
spoiler: Boolean!
}

"""
FlairBadgeConfigurationInput specifies the configuration for flair badges,
including whether they are enabled and their image urls.
"""
input FlairBadgeConfigurationInput {
flairBadgesEnabled: Boolean
flairBadgeURLs: [String!]
Expand Down Expand Up @@ -5779,6 +5791,10 @@ input SettingsInput {
"""
embeddedComments: EmbeddedCommentsConfigurationInput

"""
flairBadges specifies the configuration for flair badges, including whether
they are enabled and any configured image urls
"""
flairBadges: FlairBadgeConfigurationInput
}

Expand Down Expand Up @@ -8532,8 +8548,12 @@ type UpdateStoryModePayload {
story: Story!
}

#########################
## createFlairBadge
#########################
input CreateFlairBadge {
"""
flairBadgeURL is the flair badge url to be created
"""
flairBadgeURL: String!
}
Expand All @@ -8545,6 +8565,7 @@ input CreateFlairBadgeInput {
clientMutationId: String!

"""
flairBadgeURL is the flair badge url to be created
"""
flairBadgeURL: String!
}
Expand All @@ -8561,13 +8582,17 @@ type CreateFlairBadgePayload {
settings: Settings!
}

#########################
## deleteFlairBadge
#########################
input DeleteFlairBadgeInput {
"""
clientMutationId is required for Relay support.
"""
clientMutationId: String!

"""
flairBadgeURL is the flair badge url to be deleted
"""
flairBadgeURL: String!
}
Expand Down Expand Up @@ -9519,9 +9544,15 @@ type Mutation {

updateSite(input: UpdateSiteInput!): UpdateSitePayload! @auth(roles: [ADMIN])

"""
createFlairBadge creates a custom flair badge url.
"""
createFlairBadge(input: CreateFlairBadgeInput!): CreateFlairBadgePayload!
@auth(roles: [ADMIN])

"""
deleteFlairBadge removes a custom flair badge url.
"""
deleteFlairBadge(input: DeleteFlairBadgeInput!): DeleteFlairBadgePayload!
@auth(roles: [ADMIN])

Expand Down

0 comments on commit 29bd1ae

Please sign in to comment.