Skip to content

Commit

Permalink
TW-1290 Add one more property for non-permanent ads places
Browse files Browse the repository at this point in the history
  • Loading branch information
keshan3262 committed Feb 20, 2024
1 parent 37514bd commit aa2a07d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/advertising/slise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export interface SliseAdPlacesRule {
divWrapperStyle?: Record<StylePropName, string>;
};
stylesOverrides?: SliseAdStylesOverrides[];
shouldHideOriginal?: boolean;
}

export interface PermanentSliseAdPlacesRule {
Expand Down
4 changes: 4 additions & 0 deletions src/routers/slise-ad-rules/ad-places.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ import {
* type: array
* items:
* $ref: '#/components/schemas/SliseAdStylesOverrides'
* shouldHideOriginal:
* type: boolean
* description: Whether original ads banners should be hidden but not removed
* default: false
* example:
* urlRegexes:
* - '^https://goerli\.etherscan\.io/?$'
Expand Down
3 changes: 2 additions & 1 deletion src/utils/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ const sliseAdPlacesRulesSchema = arraySchema()
divWrapperStyle: styleSchema
})
.required(),
stylesOverrides: arraySchema().of(sliseAdStylesOverridesSchema.clone().required())
stylesOverrides: arraySchema().of(sliseAdStylesOverridesSchema.clone().required()),
shouldHideOriginal: booleanSchema().default(false)
})
.required()
)
Expand Down

0 comments on commit aa2a07d

Please sign in to comment.